IoRegisterDriverReinitialization Question

Hello,

If I call IoRegisterDriverReinitialization() in the DriverEntry() of my
Win2K Bus Driver, then the ReInitialization() routine would ALWAYS be
called before the call to my AddDevice() routine, is that right ? Or can
it be called in this order also: DriverEntry, AddDevice, ReInitialization
?

Please clarify.

Thanks
Puja

>

If I call IoRegisterDriverReinitialization() in the
DriverEntry() of my
Win2K Bus Driver, then the ReInitialization() routine would ALWAYS be
called before the call to my AddDevice() routine, is that
right ?

I don’t think you can count on that. Here the DDK says:

"For example, the system’s keyboard class driver, kbdclass, supports both
PnP and legacy keyboard ports. If a system includes one or more legacy ports
that the PnP Manager cannot detect, the keyboard class driver must
nevertheless create a device object for each port and layer itself over
lower-level drivers for the port. Consequently, the class driver has a
Reinitialize routine to be called after its DriverEntry and AddDevice
routines have been called and other drivers have been loaded. The
Reinitialize routine detects the port, creates a device object for it, and
layers the driver over other lower-level drivers for the device. "

\help\d_kernel.chm::/hh/ntddk/d_kernel/05dentry_18o7.htm

Or can
it be called in this order also: DriverEntry, AddDevice,
ReInitialization

I think that either order is possible. You may however reschedule
ReInitialization from your ReInit routine.

No, generally it would be other wise unless if the devices ur controlling
are legacy devices( which doesn’t have harware PnP support). We have seen
from our exerience that only after AddDevice/StartDevice for all PDOs (those
to which we are attaching to), Reinitialize routine is called.

thanx
pash

>
> If I call IoRegisterDriverReinitialization() in the
> DriverEntry() of my
> Win2K Bus Driver, then the ReInitialization() routine would ALWAYS be
> called before the call to my AddDevice() routine, is that
> right ?

I don’t think you can count on that. Here the DDK says:

"For example, the system’s keyboard class driver, kbdclass, supports both
PnP and legacy keyboard ports. If a system includes one or more legacy
ports
that the PnP Manager cannot detect, the keyboard class driver must
nevertheless create a device object for each port and layer itself over
lower-level drivers for the port. Consequently, the class driver has a
Reinitialize routine to be called after its DriverEntry and AddDevice
routines have been called and other drivers have been loaded. The
Reinitialize routine detects the port, creates a device object for it, and
layers the driver over other lower-level drivers for the device. "

\help\d_kernel.chm::/hh/ntddk/d_kernel/05dentry_18o7.htm

> Or can
> it be called in this order also: DriverEntry, AddDevice,
> ReInitialization
>

I think that either order is possible. You may however reschedule
ReInitialization from your ReInit routine.


You are currently subscribed to ntdev as: xxxxx@Legato.COM
To unsubscribe send a blank email to $subst(‘Email.Unsub’)