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


Reply With Quote
Victor Nijegorodov 