Microsoft Windows CE 3.0  

NdisMInitializeTimer

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 initializes a timer object associated with a driver's MiniportTimerfunction.

VOID NdisMInitializeTimer(
IN OUT PNDIS_MINIPORT_TIMER
Timer
,
IN NDIS_HANDLE
MiniportAdapterHandle
,
IN PNDIS_TIMER_FUNCTION
TimerFunction
,
IN PVOID
FunctionContext
);

Parameters

Timer
Pointer to caller-supplied resident storage for a timer object. The timer object is opaque to the caller, but, when it has been initialized, this pointer is a required parameter to the NDIS timer functions.
MiniportAdapterHandle
Handle input to the MiniportInitializefunction.
TimerFunction
Specifies the entry point of a caller-supplied MiniportTimerfunction.
FunctionContext
Pointer to a caller-supplied context area to be passed to the given MiniportTimerfunction when it is called.

Remarks

MiniportInitializemust call this function to set up the driver's MiniportTimerfunction(s), if any. MiniportInitializemust call this function before the driver passes the MiniportTimerpointer to any other NDIS timer function.

Drivers of NICs that do not generate interrupts initialize at least one timer object for a polling MiniportTimerfunction that monitors the NIC state for incoming receives and for send completions.

Calls to the NDIS timer functions insert the timer object in the system timer queue. Calls to the NdisMCancelTimerfunction dequeue the timer object if it is currently queued. Only one instantiation of a particular timer object can be queued at any given moment.

When a driver calls the NdisMSetTimerfunction, the timer object at Timeris queued until the interval specified in the call expires. When it does, the timer object is dequeued, and the caller-supplied TimerFunctionis run once at IRQL DISPATCH_LEVEL as soon as a processor becomes available. When a driver calls the NdisMSetPeriodicTimerfunction, the timer object is dequeued and the caller-supplied TimerFunctionis run when the given interval expires. However, the timer object is automatically requeued for the same fixed interval, so MiniportTimerruns periodically, also at IRQL DISPATCH_LEVEL.

MiniportInitializecan call this function more than once to initialize more than one timer object, each associated with a distinct MiniportTimerfunction. For example, an NIC driver might have one MiniportTimerfunction that polls the NIC state periodically and another that the miniport uses only to time-out a particular operation on its NIC. Each such MiniportTimerfunction has different functionality should be associated with a different timer object by calling this function from MiniportInitialize.

A driver that calls this function runs at IRQL PASSIVE_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.

See Also

NdisMCancelTimer, NdisMSetPeriodicTimer, NdisMSetTimer



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.