468,556 Members | 2,135 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,556 developers. It's quick & easy.

PCI Bus access in C++ (Windows)

hi tere,

I'm trying to write an application which should access to the PCI Bus
headers to get all informations about installed cards.
But I dont know how to access to these informations from windows...

I read lspci.c file from a linux distribution, it seems to be not portable
to windows without cygwin...

So, where could I find some hint about how to access to these informations
???

thanks for your help,

best regards,

Michel

--
Equipe Poséidon_____________
http://poseidon.epfl.ch

Helpdesk:
Du Lundi au Jeudi de 11h à 18h
Le vendredi de 11h à 16h
local: CO 050
Mar 28 '06 #1
4 10215
MIchel,
PCI cards installed in the PC using Windows are handled by the PnP
manager (Plug-and-Play). And accessing PCI configuration headers is
more of a device driver problem that a c++, but anyhow Windows has
already read those headers when the system boots up.
So instead of 'reading' in your own why not try it in the registry?
Information can be found in:
HKEY_LOCAL_MACHINE\Enum\PCI\VEN_<vendorID>&DEV_<de viceID>&SUBSYS_<subsystemID>&REV_<hardwarerevision ID>

Regards,
Krby

Mar 28 '06 #2
Krby,
I'm trying to acces to the PCI space cause I want to installed some specific
applications after windows installation. Applications like: fingerprint
software on thinkpads laptop...
But I need to know if the device is present or not..

regards,

michel.
"krbyxtrm" <kr******@gmail.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
MIchel,
PCI cards installed in the PC using Windows are handled by the PnP
manager (Plug-and-Play). And accessing PCI configuration headers is
more of a device driver problem that a c++, but anyhow Windows has
already read those headers when the system boots up.
So instead of 'reading' in your own why not try it in the registry?
Information can be found in:
HKEY_LOCAL_MACHINE\Enum\PCI\VEN_<vendorID>&DEV_<de viceID>&SUBSYS_<subsystemID>&REV_<hardwarerevision ID>

Regards,
Krby

Mar 28 '06 #3
I see, but are you detecting an specific hardware, or just seeing if
there are installed cards on the PC slots?
In either case, you can use the DevCon sample found in Windows DDK. The
sample shows how to enumerate devices such as PCI.

BTW, you can download the ddk free of charge from Microsoft.

Regards,
Krby

Mar 28 '06 #4
Michel Mengis wrote:
Krby,
I'm trying to acces to the PCI space cause I want to installed some specific
applications after windows installation. Applications like: fingerprint
software on thinkpads laptop...
But I need to know if the device is present or not..


I suspect that will be much easier looking at the enumerated devices in
the registry, rather than poking around at the data on the bus.

Equally for linux... except perhaps I'd grep lspci output...

Anyway, this is pretty OS specific, there is no way to do it with just
C++, so you'd do better to ask in an OS specific newsgroup.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Mar 28 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by BigDaDDY | last post: by
33 posts views Thread by Uwe Range | last post: by
52 posts views Thread by Neil | last post: by
21 posts views Thread by nihad.nasim | last post: by
6 posts views Thread by Wesley Peace | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.