Jump to content
Tuts 4 You

How to send text into a Edit control of a other process?


LCF-AT

Recommended Posts

Posted

Hi guys,

I have a new small question.

I would like to start a new other process from my app using CreateProcess function.Now if the new other app runs I would like to send some datas into the other app like to an edit control.

Example: App 1 and App 2.Both can run for itself without to need each other.Now I wanna start App 2 from App 1 = both apps running.Here I would like already to send some datas from App 1 into App 2 on startup like PID / Handle infos etc and if App 2 runs it should check whether infos was send on startup or not to know that App 1 is waiting for some infos from App 2.App 2 should now send infos to App 1 so in my case example it should just send text from clipboard into a specific Edit control of App 1 so that App 1 does get this info and  shows them into the specific Edit control.You know what I mean right?

How can I do this?Normal if I run another process from app 1 then I have the PROCESS_INFORMATION of the new created process.Somehow here I should send some infos to this process into any specific static location so that App 1 does check this locations on start to know aha I must send datas to app 1.Something like that you know.I think I just need the PID and HWND and ID of Edit control of app 1 in app 2 and sending then anyhow new  text into app 1.Similar like SendMessage,WM_SETTEXT in own process.Has anyone done this before already and could tell how I could do this?

greetz

Posted

Hi Ted,

after some trying and remembering I found out a way using FindWindow/Ex functions.

		    invoke FindWindow,NULL,chr$("App1")
		    .if eax != FALSE
		        mov edi, eax
                        xor esi, esi
                    .while eax != FALSE
		            invoke FindWindowEx,edi,esi,chr$("Edit"),NULL
		            .if eax != FALSE
		                mov esi, eax
		                invoke GetDlgCtrlID,esi
		                .if eax != FALSE
		                    .if eax == 1002 ; EDIT ID of App1
		                        invoke SendMessage,esi,WM_SETTEXT,0,_buffer
		                        .break
		                    .endif
		                .endif
		            .endif
		            .endw
		    .endif  

Seems to work. :) Should be ok for my task.

greetz

Teddy Rogers
Posted

Just be mindful of UIPI and process elevation levels if you plan on using SendMessage. Otherwise you will need to look at changing window message filters (ChangeWindowMessageFilterEx) of lower privileged windows. You can check if your messages are being blocked by calling GetLastError and checking for access denied (5)...

Ted.

  • Like 1
Posted

Hi guys,

I will check this WM_COPYDATA  too fearless.Thanks for that info.

Ok Ted,so on my tests all seems to work without getting any error but I already did wonder why its working so easy.Before I thought also I need to set some access rights for the other process or something.So could you explain this ChangeWindowMessageFilterEx function a little for me?I dont get it yet.Or just tell me how to check this.

Lets say I execute my example code from above from App 2 to send text to App 1's edit control via SendMessage WM_SETTEXT.After this function I check eax for TRUE = success or FALSE = failed.In a case of failed I should now call GetLastError function and checking for ERROR_ACCESS_DENIED.Ok,lets say it is this case so what then?Calling now ChangeWindowMessageFilterEx.The HWND = main HWND of App 1 itself right?So I mean the first handle I got from FindWindow function.What to enter in message paramter = WM_SETTEXT?For 3 paramter = MSGFLT_ALLOW and 4 parameter = nothing.Do you mean this so?

Example:

		    invoke FindWindow,NULL,chr$("App1")
		    .if eax != FALSE
		        mov edi, eax
                xor esi, esi
                    .while eax != FALSE
		            invoke FindWindowEx,edi,esi,chr$("Edit"),NULL
		            .if eax != FALSE
		                mov esi, eax
		                invoke GetDlgCtrlID,esi
		                .if eax != FALSE
		                    .if eax == 1002 ; Edit control ID of App1
		                        invoke SendMessage,esi,WM_SETTEXT,0,_buffer
		                        .if eax == FALSE
		                            invoke GetLastError
		                            .if eax == ERROR_ACCESS_DENIED
		                                invoke LoadLibrary,chr$("user32.dll")
		                                invoke GetProcAddress,eax,chr$("ChangeWindowMessageFilterEx")
		                                .if eax != FALSE
		                                    push NULL
		                                    push TRUE ; MSGFLT_ALLOW
		                                    push WM_SETTEXT
		                                    push edi
		                                    call eax
		                                    .if eax != FALSE
		                                        invoke SendMessage,esi,WM_SETTEXT,0,_buffer
		                                        .break
		                                    .endif
		                                .endif
		                            .endif
		                        .endif
		                        .break
		                    .endif
		                .endif
		            .endif
		            .endw
		    .endif 

So I tried this code.In my case WM_SETTEXT does work before ...I bypassed this and did call this ChangeWindowMessageFilterEx function and here I get this error 5 of ERROR_ACCESS_DENIED back and eax FALSE.Have I dont it wrong etc?Or do you mean I need to use this function ChangeWindowMessageFilterEx in App1 and not in App2?

I also tried to use ChangeWindowMessageFilterEx in App1 calling with MSGFLT_DISALLOW with WM_SETTEXT.Now in app2 I did call WM_SETTEXT with handle of Edit control of App1 and its still working = no access denied etc.

Do you have a small example code using this function to set to allow / disallow correctly?Just wanna test whether it works in both directions to verify it.

Thank you

Teddy Rogers
Posted

Make sure the higher privileged application is the one changing the message filter of the lower privileged window. Ensure you have the correct window handle of the lower privileged window. Have a read through the remarks for ChangeWindowMessageFilterEx.

Another thing to be mindful of is if you allow multiple instances of the same application. You may need to consider using mutex's or assigning unique identifiers to each application...

Ted.

  • Like 1
Posted

Hi Ted,

I still dont know how to use this function right.I tried to use it in both apps already but without success to disable it (for testing).As I said I have 2 apps.

App 1 main app and App 2.

1.) If I am using ChangeWindowMessageFilterEx in App 1 at WM_INITDIALOG message then I get success in eax back...

.if	uMsg == WM_INITDIALOG

        invoke GetDlgItem,hWnd,IDC_URL  ; Edit control 
		mov edi, eax
		invoke LoadLibrary,chr$("user32.dll")
		invoke GetProcAddress,eax,chr$("ChangeWindowMessageFilterEx")
        push NULL
        push 2;TRUE ; MSGFLT_ALLOW 2 = MSGFLT_DISALLOW 0 = MSGFLT_RESET
        push WM_SETTEXT
        push edi
        call eax

...now if App 1 runs I start App 2 and send some text into the IDC_URL edit control of App 1 using SendMessage / WM_SETTEXT and its still working.In this example I thought it would no more work because I called ChangeWindowMessageFilterEx with paramter MSGFLT_DISALLOW = 2 but its still working.Why?

I also tried to use it with main routine handle instaed of Edit control handle but also has no effect.Also tried to use the CHANGEFILTERSTRUCT.How its done right?

greetz

Teddy Rogers
Posted

I led you astray when I stated getting the higher privileged window to change the lower privileged window. Apologies for that!

What you need to do is have the higher privileged window change its own handles (window, gadget, etc.) to accept specified messages.

In the example below a lower window wants to send #WM_SETTEXT to a higher window. It will not be able to complete this because of UIPI...

EnableExplicit

Enumeration Windows
  #Window
  #Gadget
EndEnumeration

Declare ChangeWindowMessageFilter()

If OpenWindow(#Window, 0, 0, 300, 60, "Window1 - Sender (Low UIPI)", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
  ButtonGadget(#Gadget, 5, 5, 290, 50, "CLICK ME!")
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Gadget
            ChangeWindowMessageFilter()
        EndSelect
        
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Procedure ChangeWindowMessageFilter()
  Protected Window, Child
  
  Window = FindWindow_(#Null, "Window2 - Receiver (High UIPI)")

  Child = GetWindow_(Window, #GW_CHILD)
  
  SendMessage_(Child, #WM_SETTEXT, 0, "Some text")
  
EndProcedure

The example below is the higher window. It wants to receive #WM_SETTEXT from the lower window to change the text of a gadget. Note that I am getting the handle of the gadget and using ChangeWindowMessageFilterEx to allow window messages to be sent from the lower window.

EnableExplicit

Enumeration Windows
  #Window
  #Gadget
EndEnumeration

Declare ChangeWindowMessageFilter()

Global User32 = OpenLibrary(#PB_Any, "user32.dll")

Prototype.i ChangeWindowMessageFilterEx(hwnd, message, action, pChangeFilterStruct)
Global ChangeWindowMessageFilterEx.ChangeWindowMessageFilterEx  

ChangeWindowMessageFilterEx = GetFunction(User32, "ChangeWindowMessageFilterEx")

If OpenWindow(#Window, 0, 0, 300, 60, "Window2 - Receiver (High UIPI)", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
  ButtonGadget(#Gadget, 5, 5, 290, 50, "CLICK ME!")
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Gadget
            ChangeWindowMessageFilter()
        EndSelect
        
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Procedure ChangeWindowMessageFilter()
  
  #MSGFLT_ALLOW = 1
  
  ; Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
  
  If ChangeWindowMessageFilterEx(GadgetID(#Gadget), #WM_SETTEXT, #MSGFLT_ALLOW, #Null)
    SetGadgetText(#Gadget, "Sender Can Now Change This Text")
  Else
    SetGadgetText(#Gadget, "Something Went Wrong!")
  EndIf
  
EndProcedure

1) Run both executables.
2) Click "CLICK ME!" in Window1 a few times and you will notice nothing changes in Window2
3) Click "CLICK ME!" in Window2 and it will update the message filter of its gadget to accept WM_SETTEXT. Button text should change now.
4) Click "CLICK ME!" in Window1 and the button (gadget) text in Window2 should now change.

Ted.

 

ChangeWindowMessageFilterEx.zip

  • Like 2
Posted

Hi Ted,

thanks for that example so far.Could you compile the executable files again but this time for x86 / 32 bit please.You always forget that I dont use x64.Tha tks.

Question: Do you have to call the code the whole time in a loop?Isnt is enough to call it only once like at WM_INIT.. message?

As I see you do only use this ChangeWindowMessageFilterEx in the reciver app using the handle of the GadgetID.But if I see it right then I tried this already as I said before with paramter 2 = MSGFLT_DISALLOW and but the sender app could still send datas to the edit control of my receiver app.Just tried here to use MSGFLT_DISALLOW to see whether its working.

Receiver App
WM_INITDIALOG

        invoke GetDlgItem,hWnd,IDC_URL  ; <--- Edit control of receiver
		mov edi, eax
		
		mov cbs.cbSize, sizeof cbs
		mov cbs.ExtStatus, NULL
		invoke LoadLibrary,chr$("user32.dll")
		invoke GetProcAddress,eax,chr$("ChangeWindowMessageFilterEx")
        lea esi,  cbs
        push esi ; cbs struct
        push 2   ; 1 = MSGFLT_ALLOW 2 = MSGFLT_DISALLOW 0 = MSGFLT_RESET
        push WM_SETTEXT ; message
        push edi        ; handle of Edit control above
        call eax        ; ChangeWindowMessageFilterEx

The code above should disallow WM_SETTEXT for this edit control to receive any text from extern apps right?So this app runs now.....and now I do start a other app manually via mouse what does send text to the edit control of reveiver app and its still working also if I have used disallow paramter above and the function ChangeWindowMessageFilterEx did return with eax 1 = success.Somehow it dosent work in my case.

Ok,just send me your x86 compiled files then I can test it to see whether yours do work for me and if yes then I can debug it to see how to make it correctly etc.

greetz

Posted

Hi Ted,

thanks for that versions.Ok I have test it and see some issue.In default mode (my PC setting etc) its already working without problems to send any datas to another exe file what means in your receiver app I dont need to press the click button to call the ChangeWindowMessageFilterEx function.Now I tried to change the paramter of this function in your receiver app from 1 = allow to 2 disallow,the function returns success but your sender app can  still send datas into receiver app and the text of button does change.Exactly thats the problem I also talked before already.Why isnt it working?

00401199  PUSH 0x0
0040119E  PUSH 0x2 <--- disallow
004011A0  NOP
004011A1  NOP
004011A2  NOP
004011A3  PUSH 0xC
004011A8  PUSH 0x1
004011AD  CALL 004026A7                  
004011B2  PUSH EAX
004011B3  CALL DWORD PTR DS:[0x40BE54]      ; USER32.ChangeWindowMessageFilterEx
eax = 1

You know what I mean right.So if I need to allow it in some cases then it should be also possible to disallow it but this does not work for me.If this isnt working from where should I know whether its working to allow it if I need it in any cases etc.So maybe you can check your files again but this time with the MSGFLT_DISALLOW 2 paramter just to verify whether this works and if yes then the button text of your receiver app shouldnt change anymore.Maybe you can check this on your PC so I dont know why its not working for me to disallow it.

greetz

Teddy Rogers
Posted

It seems to be working perfectly fine here. I remade the example code slightly, find attached and below. I added some error checking and reporting, it may help you out a bit.

As to why it may not be working for you. Possibly you have changed your Windows settings lowering UAC and/or secure desktop security policy settings.

image.png.bd01e91156e0df9a778d3f43192db113.png

Window1 - Sender (Low UIPI)

EnableExplicit

Enumeration Windows
  #Window
  #Gadget
EndEnumeration

Declare ChangeWindowMessageFilter()

If OpenWindow(#Window, 0, 0, 300, 60, "Window1 - Sender (Low UIPI)", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
  ButtonGadget(#Gadget, 5, 5, 290, 50, "CLICK ME!")
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Gadget
            ChangeWindowMessageFilter()
        EndSelect
        
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Procedure ChangeWindowMessageFilter()
  Protected Window, Child
  Static Num
  
  Num = Num + 1
  
  Window = FindWindow_(#Null, "Window2 - Receiver (High UIPI)")

  Child = GetWindow_(Window, #GW_CHILD)
  
  SendMessage_(Child, #WM_SETTEXT, 0, Str(Num))
  
EndProcedure

Window2 - Receiver (High UIPI)

EnableExplicit

Enumeration Handles
  #Window
  #Gadget0
  #Gadget1
  #Gadget2
  #Gadget3
EndEnumeration

Enumeration Action
  #MSGFLT_RESET
  #MSGFLT_ALLOW
  #MSGFLT_DISALLOW
EndEnumeration

Structure CHANGEFILTERSTRUCT
  cbSize.l
  ExtStatus.l
EndStructure

Global CHANGEFILTERSTRUCT.CHANGEFILTERSTRUCT\cbSize = SizeOf(CHANGEFILTERSTRUCT)

Declare.i WindowsErrorCode(ErrorCode, ExtStatus)

Prototype.i ChangeWindowMessageFilterEx(hwnd, message, action, pChangeFilterStruct)
Global ChangeWindowMessageFilterEx.ChangeWindowMessageFilterEx  

Global User32 = OpenLibrary(#PB_Any, "user32.dll")
ChangeWindowMessageFilterEx = GetFunction(User32, "ChangeWindowMessageFilterEx")

If OpenWindow(#Window, 0, 0, 305, 60, "Window2 - Receiver (High UIPI)", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
  ButtonGadget(#Gadget0, 5, 5, 70, 50, "NUM")
  ButtonGadget(#Gadget1, 80, 5, 70, 50, "RESET")
  ButtonGadget(#Gadget2, 155, 5, 70, 50, "ALLOW")
  ButtonGadget(#Gadget3, 230, 5, 70, 50, "DISALLOW")
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_Gadget
        Select EventGadget()
            
          Case #Gadget1
            ChangeWindowMessageFilterEx(GadgetID(#Gadget0), #Null, #MSGFLT_RESET, @CHANGEFILTERSTRUCT)

          Case #Gadget2
            ChangeWindowMessageFilterEx(GadgetID(#Gadget0), #WM_SETTEXT, #MSGFLT_ALLOW, @CHANGEFILTERSTRUCT)
            
          Case #Gadget3
            ChangeWindowMessageFilterEx(GadgetID(#Gadget0), #WM_SETTEXT, #MSGFLT_DISALLOW, @CHANGEFILTERSTRUCT)
            
        EndSelect

        WindowsErrorCode(GetLastError_(), CHANGEFILTERSTRUCT\ExtStatus)
        
      Case #PB_Event_CloseWindow
        End
        
    EndSelect
  ForEver
EndIf

Procedure.i WindowsErrorCode(ErrorCode, ExtStatus)
  Protected lpBuffer, Message.s
  
  Select ExtStatus
    Case 0
      Message.s = "MSGFLTINFO_NONE" + #CRLF$ +
                  "Applies to MSGFLT_ALLOW and MSGFLT_DISALLOW."
    Case 1
      Message.s = "MSGFLTINFO_ALREADYALLOWED_FORWND" + #CRLF$ +
                  "The message has already been allowed by this window's message filter, and the function thus succeeded with no change to the window's message filter. Applies to MSGFLT_ALLOW."
    Case 2
      Message.s = "MSGFLTINFO_ALREADYDISALLOWED_FORWND" + #CRLF$ +
                  "The message has already been blocked by this window's message filter, and the function thus succeeded with no change to the window's message filter. Applies to MSGFLT_DISALLOW."
    Case 3
      Message.s = "MSGFLTINFO_ALLOWED_HIGHER" + #CRLF$ +
                  "The message is allowed at a scope higher than the window. Applies to MSGFLT_DISALLOW."
  EndSelect
  
  FormatMessage_(#FORMAT_MESSAGE_FROM_SYSTEM | #FORMAT_MESSAGE_ALLOCATE_BUFFER, #FORMAT_MESSAGE_FROM_STRING, ErrorCode, #Null, @lpBuffer, #Null, #Null)
  MessageRequester("GetLastError Code: " + ErrorCode, PeekS(lpBuffer) + #CRLF$ + Message.s, #MB_ICONERROR | #MB_TOPMOST | #MB_SETFOREGROUND)
  
EndProcedure

Ted.

ChangeWindowMessageFilterEx.zip

  • Like 1
Posted

Hi Ted,

thanks for the new files so I did checked them out.So it keep working to send datas from sender to receiver anyway if I allow or disallow it so the counter button gets increased the whole time.I always get this info back if I press reset / allow / disallow buttons...

E.png.a1d8f206612a76120405024bfae849c9.png

...seems they have really no effect for me.

About UAC.I have this disabled.Do you have yours enabled?I think I need to reboot if I change this settings for UAC.Do you mean if I enable it then it should trigger something?Maybe if its really the UAC setting reason that its not working for so do you know which minimum setting I need to set in UAC window?There are 4 settings I can set....

E2.png.dc290b7dfced2ff718da0bee3465d59d.png

....the last one I have = disabled.

Of course I dont know the UAC settings of any user who using my apps,so in this case I should better use this function code to allow getting some input from a extern source right?

One  more thing about allowing.So in my case I wanna allow first a specific EDIT control to receive some text datas with WM_SETTEXT message = like above already.Also I wanna allow the receiver to get WM_COMMAND in my main proc input from extern sources.Have I to enable this too?

Example: Below my code in my sender app.Sending text to EDIT control of receiver app and after this also sending WM_COMMAND + ID for a button / wparam to the main routine.

Send2StreamTool proc uses edi esi _buffer:DWORD
    
local runs:DWORD    

		    invoke FindWindow,NULL,chr$("Stream Tool 1.0 (Drag & Drop broken video files!)")
		    .if eax != FALSE
		        mov edi, eax
                xor esi, esi
                    .while eax != FALSE
		            invoke FindWindowEx,edi,esi,chr$("Edit"),NULL
		            .if eax != FALSE
		                mov esi, eax
		                invoke GetDlgCtrlID,esi
		                .if eax != FALSE
		                    .if eax == 1002 ; URL EDIT Handle of stream tool 1.0
		                        invoke SendMessage,esi,WM_SETTEXT,0,_buffer
		                        .if eax == FALSE
		                            invoke SetDlgItemText,hWnd_Main,IDC_INFO,chr$("SendMessage to other process failed!")
		                        .else
		                            invoke GetDlgItem,hWnd_Main,IDC_CHECKBOXSENDPLAY
		                            mov ecx, eax
		                            invoke IsWindowEnabled,ecx
		                            .if eax != FALSE
			                            invoke IsDlgButtonChecked,hWnd_Main,IDC_CHECKBOXSENDPLAY
	                                    .if eax == BST_CHECKED	
	                                        invoke SendMessage,edi,WM_COMMAND,1009,NULL ; IDC_PLAY == 1009 of stream  tool
	                                    .endif 
                                    .endif    
		                        .endif
		                        .break
		                    .endif
		                .endif
		            .endif
		            .endw
		    .endif 
    
	Ret
Send2StreamTool endp

....now in my receiver app I execute this code once only at WM_INIT....

        invoke GetDlgItem,hWnd,IDC_URL  ; <--- Edit control to receive text
        invoke SetMessageFilter,eax,WM_SETTEXT,MSGFLT_ALLOW ;  <--- allow edit control 
        invoke SetMessageFilter,hWnd,WM_COMMAND,MSGFLT_ALLOW ; <--- allow with main routine handle
SetMessageFilter proc uses edi esi _handle:DWORD,_message:DWORD,_mode:DWORD

    invoke GetModuleHandle,chr$("user32.dll")
    .if eax == FALSE
        invoke LoadLibrary,chr$("user32.dll")
        .if eax == FALSE
            ret
        .endif
    .endif
    mov edi, eax ; base of user32
    invoke GetProcAddress,edi,chr$("ChangeWindowMessageFilterEx")
    .if eax == FALSE
        ret
    .endif
    mov esi, eax ; function to esi
    push NULL
    push _mode
    push _message
    push _handle
    call esi
    
	ret
SetMessageFilter endp

...like this.Just wanna allow the edit control XY and WM_COMMAND for main routine.Should this be ok so far or do you see any problem issues here?Just wanna be sure also if I cant test it on my PC now because of disabled UAC settings.As I said,I just wanna allow the edit control / WM_SETTEXT & WM_COMMAND for main hwnd at the moment to receive some datas.

greetz

Teddy Rogers
Posted

Run a fresh installation of an OS in a virtual machine. It is a simple and good way to test your programs across various OS's and configurations.

New installs have UAC set at the second highest value.

Check "default" UIPI value in your registry, I suspect there may be a value in "data". Delete this so that a value is not set.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\UIPI

The code looks okay, just be sure you have the correct handle and the parameter being passed is correct. You can use GetLastError to check this.

The remarks for ChangeWindowMessageFilterEx mention values lower than WM_USER can be, "passed through the filter, regardless of the filter setting"...

Ted.

  • Like 1
Posted (edited)

Hi Ted,

I only have XP in VM and there is no UAC present.Just testet your file in XP too but its crashing because of missong ChangeWindowMessageFilterEx functions which only is present from Win 7.The regkey to UIPI is empty (Win7) only a clipboard / ExceptionFormats folder entry is into and nothing else.

Ok,so if you say my code looks ok so far then its ok for me too.If the functions is present then I call it if I want to enable some handles / WM_ messages etc.

One thing about the info to WM_USER and  lower values.So do you mean I cant use higher values?Ok,on the other hand WM_USER is already the highest one of all WM_x messages.

WM_USER                              equ 400h <-- highest
WM_COMMAND                           equ 111h
WM_SETTEXT                           equ 0Ch
WM_NULL                              equ 0h   <-- lowest
etc..

greetz

Edited by LCF-AT
Teddy Rogers
Posted
Quote

Certain messages whose value is smaller than WM_USER are required to be passed through the filter, regardless of the filter setting. There will be no effect when you attempt to use this function to allow or block such messages.

My interpretation of this is that some window messages below 0x0400 will be allowed irrespective of ChangeWindowMessageFilterEx filtering. I do not know which window messages are affected. Just keep this in mind if something seems to not be working.

Use a virtual machine to test your programs and default OS builds. It is going to save you a lot of time trying to guess if things are not working correctly because of the way you have customised your OS...

Ted.

Teddy Rogers
Posted
1 hour ago, Teddy Rogers said:

I do not know which window messages are affected.

I ran a very quick test and it looks like the following window messages below 0x0400 (on Windows 10) cannot be blocked...

003 / 0x0003 / WM_MOVE
005 / 0x0005 / WM_SIZE
013 / 0x000D / WM_GETTEXT
014 / 0x000E / WM_GETTEXTLENGTH
051 / 0x0033 / WM_GETHOTKEY
127 / 0x007F / WM_GETICON
773 / 0x0305 / WM_RENDERFORMAT
776 / 0x0308 / WM_DRAWCLIPBOARD
781 / 0x030D / WM_CHANGECBCHAIN
787 / 0x0313 / WM_POPUPSYSTEMMENU (Undocumented)
794 / 0x031A / WM_THEMECHANGED
795 / 0x031B / WM_UAHINIT (Undocumented)
799 / 0x031F / WM_DWMNCRENDERINGCHANGED (Undocumented)

Ted.

  • Like 1
Posted

Hey Ted,

thanks for the another infos so far.So if you say that those messages cant be blocked / disabled does it also mean they cant be enabled / allowed?Its only for Win 10 or lower OS too?Just asking so I didnt used or did know about that UIPI thing before....also I hadnt used to send any datas from one app to another before like I did in the example above.But good to know that now.

greetz

Teddy Rogers
Posted
16 hours ago, LCF-AT said:

So if you say that those messages cant be blocked / disabled does it also mean they cant be enabled / allowed?

From my quick test these are the window messages that you won't be able to block, or change the window filtering of, by using ChangeWindowMessageFilterEx.

16 hours ago, LCF-AT said:

Its only for Win 10 or lower OS too?

I only did a quick test on Windows 10, I would expect the result to be similar from Windows Vista onward...

Ted.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...