Is there a way to get the PCI bus, device, and function number for a
device that works even when Windows has been localized to another
language?

I'm getting SPDRP_LOCATION_INFORMATION with the SetupDi functions and
on an English system I get a string like "PCI bus 0, device 31,
function 1" and I'm able to parse out the info. But if I'm running on
the Japanese version of Windows XP, that string is in Japanese so the
parsing fails. I can look for numeric digits and parse those in order,
but that's a hack and I'm not sure if it will work on all languages
since the string could be re-ordered.

I looked around at the other SPDRP_* properties, but nothing seemed to
contain the PCI bus, device, and function numbers.

Is there some other way to do this?

Re: PCI bus, device, and function numbers from SetupDi? by Tim

Tim
Thu Aug 03 23:26:26 CDT 2006

"skillzero@gmail.com" <skillzero@gmail.com> wrote:
>
>Is there a way to get the PCI bus, device, and function number for a
>device that works even when Windows has been localized to another
>language?

How could this possibly be of use in a user-mode SetupDi application?
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: PCI bus, device, and function numbers from SetupDi? by Vetzak

Vetzak
Fri Aug 04 02:30:46 CDT 2006


Well, most information is useful, isn't it? Suppose he wants to write a
PCI information program.


Tim Roberts wrote:
> "skillzero@gmail.com" <skillzero@gmail.com> wrote:
> >
> >Is there a way to get the PCI bus, device, and function number for a
> >device that works even when Windows has been localized to another
> >language?
>
> How could this possibly be of use in a user-mode SetupDi application?
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.