IoRegisterDriverReinitialization function (ntddk.h)
The IoRegisterDriverReinitialization routine is called by a driver during its initialization or reinitialization to register its Reinitialize routine to be called again before the driver's and, possibly the system's, initialization is complete.
Syntax
void IoRegisterDriverReinitialization(
[in] PDRIVER_OBJECT DriverObject,
[in] PDRIVER_REINITIALIZE DriverReinitializationRoutine,
[in, optional] PVOID Context
);
Parameters
[in] DriverObject
Pointer to the driver object that was input to the DriverEntry routine.
[in] DriverReinitializationRoutine
Pointer to the driver's Reinitialize routine.
[in, optional] Context
Pointer to the context to be passed to the driver's Reinitialize routine.
Return value
None
Remarks
A driver can call this routine only if its DriverEntry routine will return STATUS_SUCCESS. If the driver-supplied Reinitialize routine must use the registry, the DriverEntry routine should include a copy of the string to which RegistryPath points as part of the context passed to the Reinitialize routine in this call.
If the driver is loaded dynamically, it is possible for this to occur during a normally running system, so all references to the reinitialization queue must be synchronized.
The Count input to a DriverReinitializationRoutine indicates how many times this routine has been called, including the current call.
The DriverEntry routine can call IoRegisterDriverReinitialization only once. If the Reinitialize routine should be run again after any other drivers' Reinitialize routines have returned control, the Reinitialize routine also can call IoRegisterDriverReinitialization as many times as the driver's Reinitialize routine should be run.
Usually, a driver with a Reinitialize routine is a higher-level driver that controls both PnP and legacy devices. Such a driver must not only create device objects for the devices that the PnP manager detects (and for which the PnP manager calls the driver's AddDevice routine), the driver must also create device objects for legacy devices that the PnP manager does not detect. A driver can use a Reinitialize routine to create those device objects and layer the driver over the next-lower driver for the underlying device.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 2000. |
Target Platform | Universal |
Header | ntddk.h (include Ntddk.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | HwStorPortProhibitedDDIs(storport), IrqlIoPassive5(wdm), PowerIrpDDis(wdm) |