Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 28th, 2006, 06:55 AM
Michel Mengis
Guest
 
Posts: n/a
Default 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


  #2  
Old March 28th, 2006, 07:25 AM
krbyxtrm
Guest
 
Posts: n/a
Default Re: PCI Bus access in C++ (Windows)

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

  #3  
Old March 28th, 2006, 08:05 AM
Michel Mengis
Guest
 
Posts: n/a
Default Re: PCI Bus access in C++ (Windows)

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.googlegro ups.com...[color=blue]
> 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
>[/color]


  #4  
Old March 28th, 2006, 09:07 AM
krbyxtrm
Guest
 
Posts: n/a
Default Re: PCI Bus access in C++ (Windows)

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

  #5  
Old March 28th, 2006, 09:25 AM
Ben Pope
Guest
 
Posts: n/a
Default Re: PCI Bus access in C++ (Windows)

Michel Mengis wrote:[color=blue]
> 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..[/color]

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...
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles