Platform SDK: DLLs, Processes, and Threads

CreateTimerQueue

The CreateTimerQueue function creates a queue for timers. Timer-queue timers are lightweight objects that enable you to specify a callback function to be called at a specified time.

HANDLE CreateTimerQueue(VOID);

Parameters

This function has no parameters.

Return Values

If the function succeeds, the return value is a handle to the timer queue. This handle can be used only in functions that require a handle to a timer queue.

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

Remarks

To add a timer to the queue, call the CreateTimerQueueTimer function. To remove a timer from the queue, call the DeleteTimerQueueTimer function.

When you are finished with the queue of timers, call the DeleteTimerQueueEx function to delete the timer queue. Any pending timers in the queue are canceled and deleted.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Kernel32.lib.

See Also

Synchronization Overview, Synchronization Functions, CreateTimerQueueTimer, DeleteTimerQueueEx, DeleteTimerQueueTimer, Thread Pooling