Discussion:
Get PCI Bus/Function/Device Number
(too old to reply)
Sushma
2010-09-28 15:06:32 UTC
Permalink
Hi All,

Is there a way to get the PCI bus, function and device number on which
my current driver is installed. I could only find bus number in
DEVICE_REGISTRY_PROPERTY. I had used WdfDeviceQueryProperty to
retrieve this data.

How can I get the function and device number?

Thank You.

Regards,
Sushma
Tim Roberts
2010-09-29 06:36:36 UTC
Permalink
Post by Sushma
Is there a way to get the PCI bus, function and device number on which
my current driver is installed.
Why? That information is not very useful.
Post by Sushma
I could only find bus number in
DEVICE_REGISTRY_PROPERTY. I had used WdfDeviceQueryProperty to
retrieve this data.
How can I get the function and device number?
DevicePropertyLocationInformation has that information in string form ("PCI
bus 12, device 0, function 0").

If you really need the numbers, this KB article tells you that
DevicePropertyAddress has function and device, and how they are packed:
http://support.microsoft.com/kb/253232
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Sushma
2010-09-29 13:06:44 UTC
Permalink
Thanks for the reply.

I was able to get the details.

Regards,
Sushma

Loading...