Tech Support > Microsoft Windows > Drivers > SetupDiGetDeviceRegistryProperty
SetupDiGetDeviceRegistryProperty
Posted by John Muczynski on December 10th, 2003


The MSDN online suggests in "Driver Information in the
Registry"
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/install/hh/install/install-over_6e3r.asp
That IoGetDeviceProperty() and
SetupDiGetDeviceRegistryProperty() be used instead of
accessing the registry directly. I'm interested in
getting the resources used by drivers. I realize that
Device Manager reports these resources and so they are
available.

I tried using IoGetDeviceProperty, but blue screens with
PNP_DETECTED_FATAL_ERROR 0x02 got in my way, thus I'm
looking at SetupDiGetDeviceRegistryProperty(). However,
the DevicePropertyBootConfigurationTranslated is not
apparently available from SetupDiGetDeviceRegistryProperty
(). The SPDRP_DEVICE_POWER_DATA doesn't provide the
resources, and I'm looking at SPDRP_DRIVER which provides
the Driver Key in the registry (Software Key). It also
refers back to "Driver Information in the Registry."

Can I get the resources for drivers without looking in the
registry? Do I have to read the ...\Control\AllocConfig
which is a REG_RESOURCE_LIST? And if so, what is the
format of that binary data, a CM_RESOURCE_LIST type of
thing?

Thanks,

John Muczynski
Bauer Controls
Ann Arbor, MI

Posted by Walter Oney on December 10th, 2003


John Muczynski wrote:
I think this is one of the cases where you need to use some of the CM_
functions in cfgmgr32.dll. The key factoid is that the "device instance"
handle you get back from SetupDiXxx functions is the same handle you use
for a devnode in a call to CM_Xxx.

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com