Export (0) Print
Expand All
Expand Minimize

IoRegisterDriverReinitialization routine

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_opt_  PVOID Context
);

Parameters

DriverObject [in]

Pointer to the driver object that was input to the DriverEntry routine.

DriverReinitializationRoutine [in]

Pointer to the driver's Reinitialize routine.

Context [in, optional]

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

Version

Available starting with Windows 2000.

Header

Ntddk.h (include Ntddk.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

IrqlIoPassive5, PowerIrpDDis, HwStorPortProhibitedDDIs

See also

IoRegisterBootDriverReinitialization
DRIVER_OBJECT

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft