Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ChangeTimerQueueTimer function

Updates a timer-queue timer that was created by the CreateTimerQueueTimer function.

Syntax


BOOL WINAPI ChangeTimerQueueTimer(
  _In_opt_ HANDLE TimerQueue,
  _Inout_  HANDLE Timer,
  _In_     ULONG  DueTime,
  _In_     ULONG  Period
);

Parameters

TimerQueue [in, optional]

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

If this parameter is NULL, the timer is associated with the default timer queue.

Timer [in, out]

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

DueTime [in]

The time after which the timer should expire, in milliseconds.

Period [in]

The period of the timer, in milliseconds. If this parameter is zero, the timer is signaled once. If this parameter is greater than zero, the timer is periodic. A periodic timer automatically reactivates each time the period elapses, until the timer is canceled using the DeleteTimerQueueTimer function or reset using ChangeTimerQueueTimer.

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

This function cannot be called while the thread is using impersonation. The resulting behavior is undefined.

You can call ChangeTimerQueueTimer in a timer callback.

If you call ChangeTimerQueueTimer on a one-shot timer (its period is zero) that has already expired, the timer is not updated.

Do not call ChangeTimerQueueTimer after calling DeleteTimerQueueTimer on a handle.

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

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);
Threadpoolapilegacyset.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

CreateTimerQueue
CreateTimerQueueTimer
DeleteTimerQueueTimer
Synchronization Functions
Thread Pooling
Timer Queues

 

 

Show:
© 2017 Microsoft