I'm trying to set up a global hook for a plugin. I am using the following call:
code:
HMODULE handle = (HMODULE)GetModuleHandle("QuickAway.dll");
retVal = SetWindowsHookEx(WH_KEYBOARD, SetStatus, handle, 0);
All the code, including the hook installation and callback function, are in QuickAway.dll.
So far, I have got the hook working, just so long as the Messenger window doesn't lose the focus. Once it does that, the plugin stops working, even when the focus returns to the Messenger window.
Is there something I'm doing wrong? If so, how do I correct it?
The rest of the code works as intended: it's just this hook.