From: Sushma on
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
From: Tim Roberts on
Sushma <sushma.yella(a)gmail.com> wrote:
>
>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.

>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, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Sushma on
Thanks for the reply.

I was able to get the details.

Regards,
Sushma