![]() ![]() So, heres my explanation of dll injection: In order to achieve this, my method of choice is DLL injection. However, since the window procedure is indirectly called by the message loop (GetMessage(), TranslateMessage(), DispatchMessage()) in the window's owner thread (in this case that thread belongs to the firewall's process), your window procedure must be in the same process for it to work. the basic principle of window subclassing is to change the window procedure (the function that handles all messages sent to the window) of a window to a custom function that you define, which will handle/record any messages necessary, and then call the original procedure. Well there are probably a few different ways to monitor window messages, but i would say the best option in your case would be window subclassing. Just tro try to get a valid handle to the button, then we can go from there and find its actual class and name, etc.Īlso, are you sure that your "wnd" handle is valid? passing NULL for the name (not if you passed NULL for the class though) ![]() ![]() (unless the button actually says "&OK" instead of "OK") passing "OK" for the name. ![]() (i've seen stranger things) try a combination of: I think WinSpy is prefixing things to the name/class that are supposed to mean something about the data, but arent acutually a part of the data. i made a program similar to this "WinSpy++" a long time ago. No, you dont have to be in the owning process to get a handle. The button's caption is OK with an underline on the O, so my guess is that the actual caption is &OK, right? I tried the same code this time with calc and it works ok. Now, regarding the handle to the button i tried that approach using FindWindowEX() and then issuing a SendMessage() to that handle sending a WM_LBUTTONDOWN and WM_LBUTTONUP but nothing happened. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |