The WdfTimerStop method stops a timer's clock.
BOOLEAN WdfTimerStop( [in] WDFTIMER Timer, [in] BOOLEAN Wait );
- Timer [in]
A handle to a framework timer object that was obtained by calling WdfTimerCreate.
- Wait [in]
A Boolean value that, if TRUE, specifies that the framework does not return until all queued calls to the driver's deferred procedure calls (DPCs), including the driver's EvtTimerFunc callback functions, have executed.
WdfTimerStop returns TRUE if the timer object was in the system's timer queue. Otherwise, this method returns FALSE. For more information, see the following Remarks section.
A bug check occurs if the driver supplies an invalid object handle.
When a driver calls WdfTimerStart, its timer object is added to the system's queue of timer objects. If the timer is not a periodic timer, the system removes the timer object from the queue after the timer's "due time" has elapsed. If the timer is a periodic timer, the timer object remains in the queue until the driver calls WdfTimerStop.
For more information about framework timer objects, see Using Timers.
WdfTimerStop must be called at IRQL = PASSIVE_LEVEL if the Wait parameter is TRUE. Otherwise, this method must be called at IRQL <= DISPATCH_LEVEL.
The following code example stops a specified timer and waits for all of the driver's queued DPCs to execute.
WdfTimerStop( timerHandle, TRUE );
|Available in version 1.0 and later versions of KMDF.|
|Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)|
|See Remarks section.|