Microsoft Windows CE 3.0  

NdisMCancelTimer

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function cancels a preceding call to the NdisMSetPeriodicTimerfunction or cancels the preceding call to the NdisMSetTimerfunction if the interval specified to NdisMSetTimerhas not yet expired.

VOID NdisMCancelTimer(
IN PNDIS_MINIPORT_TIMER
Timer
,
OUT PBOOLEAN
TimerCanceled
);

Parameters

Timer
Pointer to a timer object, already initialized with the NdisMInitializeTimerfunction and set with the NdisMSetPeriodicTimeror the NdisMSetTimerfunction.
TimerCanceled
Pointer to a caller-supplied variable, which this function sets to TRUE if the timer was queued and then canceled, or to FALSE if the timer either was not set or has already fired.

Remarks

All NDIS timer functions operate on an opaque timer object, for which an NIC driver must supply resident storage. The MiniportInitializefunction must call NdisMInitializeTimerwith a caller-supplied pointer to this storage, thus associating a driver-supplied MiniportTimerfunction with the timer object. MiniportInitializemust call NdisMInitializeTimerbefore the driver passes the Timerpointer to any other NDIS timer function.

Drivers of NICs that do not generate interrupts have a polling MiniportTimerfunction to monitor the NIC state for incoming receives and for send completions.

Calls to the NdisMSet XXXTimerfunctions insert the timer object in the system timer queue. Calls to this function dequeue the timer object if it is currently queued. Only one instantiation of a particular timer object can be queued at any moment.

A call to this function while the timer object designated by Timeris queued removes the timer object from the queue, thus canceling the execution of the associated MiniportTimerfunction.

A subsequent call to NdisMSetTimeror NdisMSetPeriodicTimerrequeues the timer object so that the MiniportTimerfunction runs again when the specified interval expires.

A call to this function can occur just after a timer has fired but before the associated MiniportTimerfunction is run. Usually, MiniportTimersets a state variable immediately on entry to indicate that it is running. When another miniport function calls this function, it can check such a TimerCancelledvariable on return from this call to determine whether its call to this function also canceled execution of MiniportTimer.

A call to this function while MiniportTimeris running has no effect on the execution of MiniportTimer. It continues to run until it returns control.

A driver that calls this function runs at IRQL <= DISPATCH_LEVEL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

SeeAlso

NdisMInitializeTimer, NdisMSetPeriodicTimer, NdisMSetTimer



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.