NdisCancelTimer (Windows CE 5.0)

Send Feedback

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

VOID NdisCancelTimer(PNDIS_TIMERTimer,PBOOLEANTimerCanceled);

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 Values

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.
Link Library: Ndis.lib

See Also

NdisInitializeTimer | NdisSetTimer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.