Share via


NdisCancelTimerObject (Compact 2013)

3/26/2014

This function cancels a timer object that is associated with a previous call to the NdisSetTimerObject function.

Syntax

BOOLEAN
  NdisCancelTimerObject(
    IN NDIS_HANDLE  TimerObject
    );

Parameters

  • TimerObject
    A handle to a timer object that NDIS provides when a driver calls the NdisAllocateTimerObject function.

Return Value

NdisCancelTimerObject returns TRUE if the specified timer object is in the system timer queue; otherwise, it returns FALSE.

Remarks

A call to NdisCancelTimerObject cancels execution of a NetTimerCallback function, as long as the last specified time-out interval has not yet expired.

NDIS drivers should call NdisCancelTimerObject first when they are halting or unloading to make sure that a NetTimerCallback function does not try to access resources that the driver has already released.

If a nonzero value was specified in the MillisecondsPeriod parameter of the NdisSetTimerObject function, the caller of NdisCancelTimerObject must be running at IRQL = PASSIVE_LEVEL. Otherwise, callers of NdisCancelTimerObject should be running at IRQL <= DISPATCH_LEVEL.

Requirements

Header

ndis.h

See Also

Reference

NDIS Timer Functions
NdisAllocateTimerObject
NdisSetTimerObject
NetTimerCallback