Question on evtDevicePrepareHardware

Ok, I’m seeing some interesting behavior when trying to install a driver on WinPE.

If I use drvload, the driver loads successfully - and I see my evtDevicePrepareHardware being fed translated resoruces (as expected).

The thing here is, I’m being to to use devcon to do the job. Ok, fine… BUT…

Trying to install the driver for the identical device, evtDevicePrepareHardware is getting called with no translated resources! This causes the driver some headaches as it expects to get resources.

This is a driver used to test audio hardware in a factory floor setting. It’s pretty simplistic (as WDF drivers go).

Is this a case of me being a newbie and not expecting to receive zero translated resources? Or is there something odd happening? I’m still trying to figure out why drvload Does The Right Thing™.

All info appreciated! It’s making me pull out what little hair I have left.

xxxxx@woolyloach.com wrote:

Ok, I’m seeing some interesting behavior when trying to install a driver on WinPE.

If I use drvload, the driver loads successfully - and I see my evtDevicePrepareHardware being fed translated resoruces (as expected).

The thing here is, I’m being to to use devcon to do the job. Ok, fine… BUT…

Trying to install the driver for the identical device, evtDevicePrepareHardware is getting called with no translated resources! This causes the driver some headaches as it expects to get resources.

Looking into my crystal ball, I see that you used “devcon install” to do
the job. Am I right?

Fatal error. The tantalizingly named “devcon install” command actually
creates a FAKE device with the exact name you are looking for, and then
loads your driver against that fake device.

You need to use something that “pre-installs” the driver, like “dpinst”
or “devcon dp_install”. That just puts the driver in a place where it
can be found when the normal PnP mechanism goes looking. That should
create happiness.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Haha, d’oh! Yep, using “devcon install” all right! I’ll look into devcon dp_install.

Thanks a ton for the help!

Quick update: “devcon dp_add” followed with a “devcon rescan” loaded my driver right up, for the right hardware, the right way.

All is happy now, I can grab some coffee and relax. Thanks again!

xxxxx@woolyloach.com wrote:

Quick update: “devcon dp_add” followed with a “devcon rescan” loaded my driver right up, for the right hardware, the right way.

All is happy now, I can grab some coffee and relax. Thanks again!

Interesting that my crystal ball saw that you were using “devcon
install” but was not good enough to point out that I gave you the wrong
option (dp_install vs dp_add). Need more Windex, I guess.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.