Compartir a través de


WaitOrTimerCallback callback function

An application-defined function that serves as the starting address for a timer callback or a registered wait callback. Specify this address when calling the CreateTimerQueueTimer, RegisterWaitForSingleObject function.

The WAITORTIMERCALLBACK type defines a pointer to this callback function. WaitOrTimerCallback is a placeholder for the application-defined function name.

Syntax

VOID CALLBACK WaitOrTimerCallback(
  _In_ PVOID   lpParameter,
  _In_ BOOLEAN TimerOrWaitFired
);

Parameters

  • lpParameter [in]
    The thread data passed to the function using a parameter of the CreateTimerQueueTimer or RegisterWaitForSingleObject function.

  • TimerOrWaitFired [in]
    If this parameter is TRUE, the wait timed out. If this parameter is FALSE, the wait event has been signaled. (This parameter is always TRUE for timer callbacks.)

Return value

This function does not return a value.

Remarks

This callback function must not call the TerminateThread function.

Examples

For an example that uses this callback function, see Using Timer Queues.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2 (include Windows.h); Winnt.h on Windows 8 and Windows Server 2012

See also

CreateTimerQueueTimer

RegisterWaitForSingleObject

Synchronization Functions