-
Global Keyboard Hook
Hi
I am trying to set a global keyboard hook with this code:
Code:
case WM_CREATE:
hHookInst = LoadLibrary(TEXT("HookProcedure.dll"));
hHookProc = (FARPROC)GetProcAddress(hHookInst,TEXT("KHookProc"));
hHook = SetWindowsHookEx(WH_KEYBOARD,(HOOKPROC)hHookProc,hHookInst,0);
The problem here is that my hook works only when MY window is active and not while some other window is in the foreground.
But isnt this supposed to be a global hook?
Should'nt it work irrespective of any window on the foreground?
-
Re: Global Keyboard Hook