The NdisAllocateTimerObject function allocates and initializes a timer object for use with subsequent NdisXxx timer functions.
NDIS_STATUS NdisAllocateTimerObject( NDIS_HANDLE NdisHandle, PNDIS_TIMER_CHARACTERISTICS TimerCharacteristics, PNDIS_HANDLE pTimerObject );
An NDIS handle that was obtained during caller initialization. For more information about obtaining NDIS handles, see Obtaining Pool Handles.
A pointer to a caller-supplied NDIS_TIMER_CHARACTERISTICS structure that specifies the characteristics of the allocated timer object.
A pointer to an NDIS timer object handle that NDIS provides to identify the timer object in subsequent calls to NdisXxx timer functions.
NdisAllocateTimerObject returns one of the following status values:
||The timer object was allocated successfully.|
||The allocation failed because of insufficient resources.|
||The allocation failed because the information in the NDIS_TIMER_CHARACTERISTICS structure is invalid.|
||None of the preceding status values apply.|
To use timer services, an NDIS driver first calls the NdisAllocateTimerObject function to initialize a timer object. Typically, NdisAllocateTimerObject is called during driver initialization.
To start a timer, call the NdisSetTimerObject function. Calls to NdisSetTimerObject insert the timer object in the system timer queue. Only one instance of a particular timer object can be queued at any given moment.
To cancel a timer, call the NdisCancelTimerObject function. NdisCancelTimerObject dequeues the timer object if it is currently queued.
To free a timer object, you must call the NdisFreeTimerObject function.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Timer_Function|