The IoInitializeTimer routine sets up a driver-supplied IoTimer routine associated with a given device object.
NTKERNELAPI NTSTATUS IoInitializeTimer( PDEVICE_OBJECT DeviceObject, PIO_TIMER_ROUTINE TimerRoutine, __drv_aliasesMem PVOID Context );
Pointer to a device object representing a device on which I/O operations can time out.
Pointer to the driver-supplied IoTimer routine.
Pointer to the driver-determined context with which its IoTimer routine will be called.
IoInitializeTimer returns STATUS_SUCCESS if the IoTimer routine is set up.
IoInitializeTimer should be called only once per device object.
A driver's IoTimer routine is called once per second after the driver enables the timer by calling IoStartTimer. The driver can disable the timer by calling IoStopTimer and can reenable it again with IoStartTimer.
The driver's IoTimer routine is called at IRQL = DISPATCH_LEVEL and therefore must not contain pageable code.
When the timer is running, the I/O manager calls the driver-supplied IoTimer routine once per second. Drivers whose time-out routines should be called at variable intervals or at intervals of finer granularity can set up a CustomTimerDpc routine and use the KeXxxTimer routines.
|Windows version||Available starting with Windows 2000.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|DDI compliance rules||IrqlIoPassive5, PowerIrpDDis, HwStorPortProhibitedDDIs|