f



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 


0
3/28/2006 6:48:40 AM
comp.lang.c++ 49146 articles. 1 followers. Post Follow

4 Replies
881 Views

Similar Articles

[PageSpeed] 6

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_<deviceID>&SUBSYS_<subsystemID>&REV_<hardwarerevisionID>

Regards,
Krby

0
krbyxtrm (30)
3/28/2006 7:13:16 AM
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" <krbyxtrm@gmail.com> wrote in message 
news:1143529996.335742.92220@i39g2000cwa.googlegroups.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_<deviceID>&SUBSYS_<subsystemID>&REV_<hardwarerevisionID>
>
> Regards,
> Krby
> 


0
3/28/2006 7:52:04 AM
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

0
krbyxtrm (30)
3/28/2006 8:54:32 AM
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...
0
3/28/2006 9:08:39 AM
Reply: