Jump to content

JournalPlaybackHook

From EDM2

This hook plays back recorded messages.

Syntax

ulTime = JournalPlaybackHook(hab, fSkip, pQmsg);

Parameters

hab (HAB) - input
Anchor-block handle.
fSkip (BOOL) - input
Indicator as to whether the next message should be played back.
TRUE: The journal playback hook skips to the next message. The pQmsg parameter is NULL in this case. The next hook in the chain is not called.
FALSE: The journal playback hook returns the next available message. The same message is returned each time, until it is skipped with a call where this parameter is TRUE.
pQmsg (PQMSG) - input
Data structure where the message to be played back is returned.
When this hook is called, the time field of the QMSG structure is initialized to the current time. This can be used to determine whether the next message is ready or not. This value must be used for any delta calculations performed by the hook procedure, rather than the result of WinGetCurrentTime.

Returns

ulTime (ULONG) - returns
Waiting time.
The time to wait (in milliseconds) before processing the current message.

Remarks

This hook is called whenever a message is required to be played back.

Example Code

#define INCL_WINHOOKS /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB   hab;   /* Anchor-block handle. */
BOOL  fSkip; /* Indicator as to whether the next message should be played back. */
PQMSG pQmsg; /* Data structure where the message to be played back is returned. */
ULONG ulTime;/* Waiting time. */

ulTime = JournalPlaybackHook(hab, fSkip, pQmsg);