14.1.1.1 Setting Up an IoTimer Routine
The DriverEntry routine must set up each IoTimer routine as follows:
-
Call IoCreateDevice first to set up the device object(s) with which the
IoTimer routine will be associated.
-
Call IoInitializeTimer with the entry point for the IoTimer routine, a Context
pointer to any driver-determined context area the IoTimer routine will use,
and a DeviceObject pointer for the target device on which an operation
could time out.
Calling IoInitializeTimer registers the driver’s IoTimer routine for
the given device object.
For more information about creating device objects and about the timer object
associated with an IoTimer routine, see Chapter 3. See also the Kernel-Mode
Driver Reference for details about IoInitializeTimer.