Reputation: 329
What is the difference between LowLevelKeyboardProc
and KeyboardProc
? I'm beginner in win hooks and only had read hooks overview at microsoft site so, please, explain me as understandable as posible :-)
Upvotes: 2
Views: 1892
Reputation: 6831
Using SetWindowsHookEx(WH_KEYBOARD_LL, ...);
will capture events directly from the keyboard driver or simulated keyboard events. SetWindowsHookEx(WH_KEYBOARD, ...);
captures events after they have been processed by the OS.
There is an OS enforced time limit for processing Low Level events and Microsoft recommends you do minimal processing on the event itself and schedule any significant work to a different thread so that the operation of the driver is not interrupted.
The higher level events include the repeat count and there is no time limit for processing the event.
Upvotes: 3