I\'m trying to hook a 3rd party app so that I can draw to its screen. Drawing to the screen is easy, and I need no help with it, but I seem to be having issues with using
I believe you need to P/Invoke GetModuleHandle and use the handle it returns for the third parameter of SetWindowsHookEx
. I also believe 0
is correct for the fourth parameter, as you don't want to hook any one specific thread in the third-party application.
If this doesn't work for you, SetWindowsHookEx on MSDN might point you in the right direction.