DWORD DefHookProc(nCode, uParam, dwParam, lphhook) | |||||
int nCode; | /* process code | */ | |||
UINT uParam; | /* first message parameter, */ | ||||
DWORD dwParam; | /* second message parameter | */ | |||
HHOOK FAR* lphhook; | /* points to address of next hook function | */ |
This function is obsolete but has been retained for backward compatibility with Windows versions 3.0 and earlier. Applications written for Windows version 3.1 should use the CallNextHookEx function.
The DefHookProc function calls the next function in a chain of hook functions. A hook function is a function that processes events before they are sent to an application's message-processing loop in the WinMain function. When an application defines more than one hook function by using the SetWindowsHook function, Windows forms a linked list or hook chain. Windows places functions of the same type in a chain.
nCode
Specifies a code used by the Windows hook function (also called the message-filter function) to determine how to process the message.
uParam
Specifies 16 bits of additional message-dependent information.
dwParam
Specifies 32 bits of additional message-dependent information.
lphhook
Points to the variable that contains the procedure-instance address of the previously installed hook function returned by the SetWindowsHook function.
The return value specifies the result of the event processing and depends on the event.
Windows changes the value at the location pointed to by the lphhook parameter after an application calls the UnhookWindowsHook function. For more information, see the description of the UnhookWindowsHook function.