NdisMInitializeTimer (Windows CE 5.0)

Send Feedback

This function initializes a timer object associated with a caller-supplied MiniportTimer function.

VOID NdisMInitializeTimer(PNDIS_MINIPORT_TIMERTimer,NDIS_HANDLEMiniportAdapterHandle,PNDIS_TIMER_FUNCTIONTimerFunction,PVOIDFunctionContext);

Parameters

  • Timer
    [in, out] 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
    [in] Handle input to the MiniportInitialize function.
  • TimerFunction
    [in] Specifies the entry point of a caller-supplied MiniportTimer function.
  • FunctionContext
    [in] Pointer to a caller-supplied context area to be passed to the given MiniportTimer function when it is called.

Return Values

None.

Remarks

MiniportInitialize must call this function to set up the driver's MiniportTimer functions, if any. MiniportInitialize must call this function before the driver passes the MiniportTimer pointer to any other NDIS timer function.

Drivers of NICs that do not generate interrupts initialize at least one timer object for a polling MiniportTimer function 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 NdisMCancelTimer function 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 NdisMSetTimer function, the timer object at Timer is queued until the interval specified in the call expires. When it does, the timer object is dequeued, and the caller-supplied TimerFunction is run once as soon as a processor becomes available. When a driver calls the NdisMSetPeriodicTimer function, the timer object is dequeued and the caller-supplied TimerFunction is run when the given interval expires. However, the timer object is automatically re-queued for the same fixed interval, so MiniportTimer runs periodically.

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

Requirements

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

See Also

MiniportInitialize | MiniportTimer | NdisMCancelTimer | NdisMSetPeriodicTimer | NdisMSetTimer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.