Hi,
for an embedded environment, I need to programmatically install drivers
for new, unknown hardware. However, because I want to install drivers
only for certain kinds of hardware, I need to know in advance what kind
of hardware it is that Windows detected. You know, when Windows detects
hardware it does not have drivers for, you get that yellow question mark
in device manager but still, most of the time, Windows knows that this
is an “Ethernet Controller” or “Video Controller” etc.
To enumerate all the hardware devices currently detected I use the
SetupDiGetClassDevs()/SetupDiEnumDeviceInfo() calls and inside the
SetupDiEnumDeviceInfo loop, I can use SetupDiGetDeviceRegistryProperty()
with SPDRP_DEVICEDESC to get at this “generic device description” for
the unknown hardware, but this string is localized in the current OS
language so I cannot safely use it.
How does Windows do it? How can I know, for an unknown PCI device (for
instance), whether it is an Ethernet or IDE device etc.?
Thanks!
Ralf.
Rajiv,
you wrote on Wednesday, June 26, 2002, 11:07:07:
RBL> Sorry for sending it directly as i could not access the List server on
RBL> osr.
No problem, thanks for your reply!
RBL> you can use the PCI class of device information present in the
RBL> config space. These include the base class, and sub class.
How can I get at this PCI class device information from an user mode
program?
RBL> For ex. Base class 2 is for Network controller, within this sub
RBL> class 0 is for Ethernet, 3 for ATM, etc.
RBL> Check out this on http://www.yourvote.com/pci you’ll find the codes
RBL> used for identifying the PCI device. You can use the pre-compiled
RBL> Vendor/Device Lists provided as a C header file.
Extremely useful, thanks!
Ralf.
> How does Windows do it? How can I know, for an unknown PCI device
(for
instance), whether it is an Ethernet or IDE device etc.?
For non-started device without functional driver, the device text is
the result of MN_QUERY_DEVICE_TEXT returned by the bus driver.
PCI.SYS builds this text based on class values from the config space.
Max
I believe PCI.SYS just looks at the PCI class code to get that
description. You can get that from the hardwareID list that it reports
(which you can query from the SetupDI API).
-p
-----Original Message-----
From: Ralf Buschmann [mailto:xxxxx@backmagic.de]
Sent: Wednesday, June 26, 2002 1:34 AM
To: NT Developers Interest List
Subject: [ntdev] Getting type of unknown hardware
Hi,
for an embedded environment, I need to programmatically install drivers
for new, unknown hardware. However, because I want to install drivers
only for certain kinds of hardware, I need to know in advance what kind
of hardware it is that Windows detected. You know, when Windows detects
hardware it does not have drivers for, you get that yellow question mark
in device manager but still, most of the time, Windows knows that this
is an “Ethernet Controller” or “Video Controller” etc.
To enumerate all the hardware devices currently detected I use the
SetupDiGetClassDevs()/SetupDiEnumDeviceInfo() calls and inside the
SetupDiEnumDeviceInfo loop, I can use SetupDiGetDeviceRegistryProperty()
with SPDRP_DEVICEDESC to get at this “generic device description” for
the unknown hardware, but this string is localized in the current OS
language so I cannot safely use it.
How does Windows do it? How can I know, for an unknown PCI device (for
instance), whether it is an Ethernet or IDE device etc.?
Thanks!
Ralf.
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%
Peter,
you wrote on Wednesday, June 26, 2002, 18:08:28:
PW> I believe PCI.SYS just looks at the PCI class code to get that
PW> description. You can get that from the hardwareID list that it reports
PW> (which you can query from the SetupDI API).
Ah, I see. But I think you are actually talking about the PCI\CC_xxyyzz
IDs in the ‘CompatibleIDs’ registry value, right? And from the DDK help
it looks like xx is the class code, yy is the subclass code and zz is
the ‘programming interface’ (whatever that means). Correct?
Thanks!
Ralf.
sorry - sounds like the compatible ID list is where the value lives.
I’ll defer to the DDK documentation on the meaning of x, y & z.
-p
-----Original Message-----
From: Ralf Buschmann [mailto:xxxxx@backmagic.de]
Sent: Wednesday, June 26, 2002 11:13 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Getting type of unknown hardware
Peter,
you wrote on Wednesday, June 26, 2002, 18:08:28:
PW> I believe PCI.SYS just looks at the PCI class code to get that
PW> description. You can get that from the hardwareID list that it
PW> reports (which you can query from the SetupDI API).
Ah, I see. But I think you are actually talking about the PCI\CC_xxyyzz
IDs in the ‘CompatibleIDs’ registry value, right? And from the DDK help
it looks like xx is the class code, yy is the subclass code and zz is
the ‘programming interface’ (whatever that means). Correct?
Thanks!
Ralf.
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%