BOOL UnhookWindowsHook(nHook,lpfnHook)
This function removes the Windows hook function pointed to by the lpfnHook 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.
| Parameter | Type/Description |
| nHook | int Specifies the type of hook function removed. It may be one of the following values: | ||
| Value | Meaning | ||
| WH_CALLWNDPROC | Installs a window-function filter. | ||
| WH_GETMESSAGE | Installs a message filter. | ||
| WH_JOURNALPLAYBACK | Installs a journaling playback filter. | ||
| Value | Meaning | ||
| WH_JOURNALRECORD | Installs a journaling record filter. | ||
| WH_KEYBOARD | Install a keyboard filter. | ||
| WH_MSGFILTER | Installs a message filter. | ||
| lpfnHook | FARPROC Is the procedure-instance address of the hook function. | ||
The return value specifies the outcome of the function. It is nonzero if the hook function is successfully removed. Otherwise, it is zero.