Ideal place to start enumerating devices (on bootup)

Hello Everybody,

I am making a driver based on the toaster sample. i was wondering where
is the best place to put code to enumerate devices on bootup? currently i
have to enter some commands to enable my devices, what i want it the devices
will load on bootup (based on some values i put in the registry)… how do i
do this?

best regards,
Rikki Tamayo

The trick is not the loading, the trick is getting your AddDevice called by the PnP manager. Causing your driver to be loaded during Boot time is simple: set the Start value in your registry entry for your driver to 0.


The personal opinion of
Gary G. Little
“Rikki Tamayo” wrote in message news:xxxxx@ntdev…
Hello Everybody,

I am making a driver based on the toaster sample. i was wondering where is the best place to put code to enumerate devices on bootup? currently i have to enter some commands to enable my devices, what i want it the devices will load on bootup (based on some values i put in the registry)… how do i do this?

best regards,
Rikki Tamayo

>The trick is not the loading, the trick is getting your AddDevice called by
the PnP manager.

Causing your driver to be loaded during Boot time is simple: set the Start
value in your registry
entry for your driver to 0.

For a PnP driver, this will only cause the kernel to consider this driver for
boot-time devnode stack building.

With other start types, any devnodes with this driver will not be built on boot
time, and will be delayed till System startup phase (after SystemRoot is
mounted).

Doing this for boot drive storage stack is a disaster, so, such drivers must
always have start type of 0.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com