// storport.h
ULONG StorPortInitializeTimer(
[in] PVOID HwDeviceExtension,
[out] PVOID *TimerHandle
);
View the official Windows Driver Kit DDI referenceNo description available.
Creates a Storport timer context object.
HwDeviceExtension [in]A pointer to the hardware device extension for the host bus adapter (HBA).
TimerHandle [out]A pointer to an opaque buffer that holds context information for the timer.
The StorPortInitializeTimer routine returns one of these status codes:
| Return code | Description |
|---|---|
| STOR_STATUS_INVALID_IRQL | Current IRQL > DISPATCH_LEVEL. |
| STOR_STATUS_INVALID_PARAMETER | Either HwDeviceExtension or TimerHandle is NULL. |
| STOR_STATUS_INSUFFICIENT_RESOURCES | Insufficient resources are available to initialize the timer context. |
| STOR_STATUS_SUCCESS | The timer context was successfully initialized. |
| STOR_STATUS_UNSUCCESSFUL | The number of supported timers is exceeded. |
Storport provides a single timer to a miniport driver by using the RequestTimerCall notification type in StorPortNotification. If a miniport requires more than one timer, additional timers are created with StorPortInitializeTimer.
It is recommended that miniports call StorPortInitializeTimer in the HwStorFindAdapter function to ensure that the additional timer resources are available.
Miniports can use this routine to set coalescing timers to create a delay period after an initial timeout.
Prior to Windows 8, a maximum of 4 timers can be created with StorPortInitializeTimer. Starting with Windows 8, there is no maximum timers limitation.