wh-keyboard-ll

SetWindowsHookEx WH_KEYBOARD_LL not getting events

I am using SetWindowsHookEx() to create a keyboard hook. The creation seems to be successful but the procedure which is registered never gets called. Is there something I am doing wrong? #region Windows API Functions Declarations [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] private st...

how to sent, keyboard message mirror to edit1 control

gMsgHook = SetWindowsHookEx(WH_KEYBOARD_LL, GetMsgHookProc, ghInstDll, 0); ....... extern "C" HOOK_DLL_API LRESULT CALLBACK GetMsgHookProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode < 0){ CallNextHookEx(gMsgHook, nCode, wParam, lParam); } KBDLLHOOKSTRUCT *dl = (KBDLLHOOKSTRUCT*)wParam; if (nCode >= HC_ACTION){ ...