I am hooking keyboard in application . Requirement is to hook keyboard in all threads in the process.
I used SetWindowsHookEx API
SetWindowsHookEx(WH_KEYBOARD_LL, (HOOKPROC)::KeyboardHookProc, hInst, 0);
The hook is created for all the threads in process. This works fine until calling thread exists .As soon as calling thread terminates hook stop working.
Is there any way to hook on process rather than threads in process.