UID | title | description | old-location | tech.root | ms.date | keywords | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | f1_keywords | topic_type | api_type | api_location | api_name | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:ndis.NdisCancelTimerObject |
NdisCancelTimerObject function (ndis.h) |
The NdisCancelTimerObject function cancels a timer object that is associated with a previous call to the NdisSetTimerObject function. |
netvista\ndiscanceltimerobject.htm |
netvista |
05/02/2018 |
|
NdisCancelTimerObject, NdisCancelTimerObject function [Network Drivers Starting with Windows Vista], ndis/NdisCancelTimerObject, ndis_timer_ref_39b68ae4-4fd7-4609-aebc-e2be21bead04.xml, netvista.ndiscanceltimerobject |
ndis.h |
Ndis.h |
Universal |
Supported in NDIS 6.0 and later. |
Irql_Timer_Function, PeriodicTimer |
Ndis.lib |
See Remarks section |
Windows |
|
|
|
|
|
The NdisCancelTimerObject function cancels a timer object that is associated with a previous call to the NdisSetTimerObject function.
A handle to a timer object that NDIS provides when a driver calls the NdisAllocateTimerObject function.
NdisCancelTimerObject returns TRUE if the specified timer object is in the system timer queue; otherwise, it returns FALSE.
A call to NdisCancelTimerObject cancels execution of a NetTimerCallback function, provided that the last specified timeout interval has not yet expired.
NDIS drivers should call NdisCancelTimerObject first when they are halting or unloading to ensure that a NetTimerCallback function does not attempt to access resources that the driver has already released.
If a nonzero value was specified in the MillisecondsPeriod parameter of the NdisSetTimerObject function, the timer is known as a periodic timer. If a zero value was specified in the MillisecondsPeriod parameter, the timer is known as a one-shot timer. The following points apply to canceling both types of timers:
- If the caller of NdisCancelTimerObject is canceling a periodic timer, it must be running at IRQL = PASSIVE_LEVEL. Otherwise, the caller of NdisCancelTimerObject should be running at IRQL <= DISPATCH_LEVEL.
-
If the caller of
NdisCancelTimerObject is canceling a periodic timer, NdisCancelTimerObject calls KeFlushQueuedDpcs to ensure that the timer is not currently running. Therefore, the caller is not required to have a separate synchronization mechanism to ensure that the timer is not currently being executed on another processor.
If the caller of NdisCancelTimerObject is canceling a one-shot timer, the caller is required to have a separate synchronization mechanism to ensure the timer is not currently running on another processor. For example, the caller could call NDIS_WAIT_FOR_MUTEX in order to wait for the timer thread to signal a mutex object when the thread is about to complete.
For more information, see Synchronization and Notification in Network Drivers.