LRESULT CALLBACK JournalRecordProc(nCode, wParam, lParam) | |||||
int nCode; | /* hook code | */ | |||
WPARAM wParam; | /* undefined | */ | |||
LPARAM lParam; | /* address of message being processed | */ |
The JournalRecordProc function is an application- or library-defined callback function that records messages that the system removes from the system message queue. Later, an application or library can use a JournalPlaybackProc function to play back the messages.
nCode
Value | Meaning |
HC_ACTION | ||
Indicates that the lParam parameter points to a valid EVENTMSG structure. The filter function should record the event message. | ||
HC_SYSMODALOFF | ||
Indicates a system-modal dialog box has been destroyed. | ||
HC_SYSMODALON | ||
Indicates a system-modal dialog box is being displayed. The filter function should unhook itself until the dialog box has been destroyed. |
If the nCode parameter is less then zero, the callback function should pass the message to CallNextHookEx without further processing.
wParam
Specifies a NULL value.
lParam
Points to an EVENTMSG structure. The EVENTMSG structure has the following form:
typedef struct tagEVENTMSG { /* em */
UINT message;
UINT paramL;
UINT paramH;
DWORD time;
} EVENTMSG;
This callback function should return zero.
A JournalRecordProc callback function should copy but not modify the messages. After control returns to the system, the message continues to be processed. The callback function does not require a return value.
An application must install the callback function by specifying the WH_JOURNALRECORD filter type and address of the callback function in a call to the SetWindowsHookEx function.
JournalRecordProc is a placeholder for the application- or library-supplied function name. The actual name must be exported by including it in the EXPORTS statement in a module-definition file.
CallNextHookEx, JournalPlaybackProc, SetWindowsHookEx