Share via


NdisMInitializeTimer

This function initializes a timer object associated with a driver's MiniportTimer function.

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

Remarks

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

Drivers of network adapters that do not generate interrupts initialize at least one timer object for a polling MiniportTimer function that monitors the network adapter 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.

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

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h   Ndislib.lib

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

MiniportInitialize, NdisMCancelTimer, NdisMSetPeriodicTimer, NdisMSetTimer

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.