NdisCancelTimer (Windows Embedded CE 6.0)

1/6/2010

This function cancels the immediately preceding call to NdisSetTimer if the interval given to NdisSetTimer has not yet expired.

Syntax

VOID NdisCancelTimer(
  PNDIS_TIMER Timer,
  PBOOLEAN TimerCanceled
);

Parameters

  • Timer
    [in] Points to a timer object, already initialized with NdisInitializeTimer and set with NdisSetTimer.
  • TimerCanceled
    [out] Points to a caller-supplied variable. NdisCancelTimer sets this variable to TRUE if the timer was queued and then canceled, or to FALSE if the timer either was not set or has already fired and caused the associated timer function to run.

Return Value

None.

Remarks

All NdisXXXTimer functions operate on an opaque timer object, for which a protocol driver must supply resident storage. The protocol driver must call NdisInitializeTimer with a caller-supplied pointer to this storage, thereby associating a driver-supplied timer function with the timer object. The protocol driver must call NdisInitializeTimer before the driver passes the Timer pointer to any other NdisXXXTimer function.

Calls to the NdisSetTimer functions insert the timer object in the system timer queue. During the interval in which the timer object is queued, calls to NdisCancelTimer remove the timer object from the queue, thereby canceling the execution of the associated timer function. Only one instance of a particular timer object can be queued at any given moment.

A subsequent call to NdisSetTimer requests the timer object so the timer function again will be run when the given interval expires.

A call to NdisCancelTimer returns TRUE in the TimerCanceled parameter if the timer was queued and then canceled. NdisCancelTimer returns FALSE if the timer function is already running or if there is no way to stop the timer function from running. If NdisCancelTimer returns FALSE, the caller must take appropriate action.

Requirements

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisInitializeTimer
NdisSetTimer