DeleteTimerQueueEx function (threadpoollegacyapiset.h)

Deletes a timer queue. Any pending timers in the queue are canceled and deleted.

Syntax

BOOL DeleteTimerQueueEx(
  [in]           HANDLE TimerQueue,
  [in, optional] HANDLE CompletionEvent
);

Parameters

[in] TimerQueue

A handle to the timer queue. This handle is returned by the CreateTimerQueue function.

[in, optional] CompletionEvent

A handle to the event object to be signaled when the function is successful and all callback functions have completed. This parameter can be NULL.

If this parameter is INVALID_HANDLE_VALUE, the function waits for all callback functions to complete before returning.

If this parameter is NULL, the function marks the timer for deletion and returns immediately. However, most callers should wait for the callback function to complete so they can perform any needed cleanup.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Do not make blocking calls to DeleteTimerQueueEx from within a timer callback.

To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header threadpoollegacyapiset.h
Library Kernel32.lib
DLL Kernel32.dll

See also

CreateTimerQueue

DeleteTimerQueueTimer

Synchronization Functions

Thread Pooling

Timer Queues