Help needed (Invalid hook handle)
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I was writing a keyboard hooking dll, used
::SetWindowsHookEx
to obtain aHHOOK
, which was 0x0233078B in my case, but when I was done with the hook, for some odd reason::UnhookWindowsHookEx
returnedFALSE
, and::GetLastError
returned error codeERROR_INVALID_HOOK_HANDLE
. I debugged the code and value of myHHOOK
never changed, so how could the handle, 0x0233078B, obtained from a successful::SetWindowsHookEx
call, suddenly become an invalid handle? Any helps are appreciated.