BOOL UnhookWindowsHook(nCode, hkprc) | |||||
int nCode; | /* type of hook function to remove | */ | |||
HOOKPROC hkprc; | /* hook function procedure-instance address | */ |
This function removes the Windows hook function pointed to by the hkprc parameter from a chain of hook functions. A Windows hook function processes events before they are sent to an application's message loop in the WinMain function.
nCode
int Specifies the type of hook function removed. It may be one of the following values:
Value | Meaning |
WH_CALLWNDPROC | ||
Removes a window-function filter. | ||
WH_CBT | ||
Removes a Computer-Based Training (CBT) filter. | ||
WH_DEBUG | ||
Removes a debugging filter. | ||
WH_GETMESSAGE | ||
Removes a message filter. | ||
WH_HARDWARE | ||
Removes a non-standard hardware-message filter. | ||
WH_KEYBOARD | ||
Removes a keyboard filter. | ||
WH_MOUSE | ||
Removes a mouse-message filter. | ||
WH_MSGFILTER | ||
Removes a message filter. |
hkprc
Specifies the procedure-instance address of the application-defined filter function to remove.
The return value specifies the outcome of the function. It is nonzero if the hook function is successfully removed. Otherwise, it is zero.
SetWindowsHook, UnhookWindowsHookEx