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++ 48844 articles. 0 followers. Post Follow

4 Replies
680 Views

Similar Articles

[PageSpeed] 2
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:
Similar Artilces:

C++ programming #5
http://computer-programmings.blogspot.com ...

Some design issues on changing from PCI->PCI-Express?
Hi, we search for the fastest way to make our board PCI-Express capable. Up to now we use a Freescale 56301 DSP with integrated PCI bridge. We don't stick to that particular IC so much, because of RoHS. But it would be nice if we could reuse the code. We have mainly two ideas: - use another DSP that is RoHS compliant and some IC that converts PCI-Express (this would be good because of the code reusage, but which interface would be inbetween the DSP and the PCIe Bridge?) or - use a FPGA that includes the functionality of the DSP and a PCI-Express implementation. So my question: 1.) which...

US-TX-Austin: Software Eng., 5yrs exp., C++ mastery on OOP, C, Assembly, debug; (45319914405)
US-TX-Austin: Software Eng., 5yrs exp., C++ mastery on OOP, C, Assembly, debug; (45319914405) ============================================================================================= Position: Software Eng. Reference: SMC01564 Location: Austin TX Duration: C-P Skills: BSCE or BSEE with a minimum of 3-5 years related experience. 3-5 years experience implementing development tools for embedded systems. C++ with emphasis on object oriented programming concepts. Proficiency with C/C++, Vi...

Pro*C question
I am new to this news group and hope someone here can point me in the right direction for this question. I am trying to understand why the SQL in my ProC program is taking longer to return than when I just drop the SQL into SQLPLUS. When running the ProC program, the activity seems to hang when doing the FETCH. The DBAs state that the SQL cannot be tuned much more because when it is used in SQLPLUS, the information is returned immediately. I am willing to post more about the issue, but I wanted to make sure I was posting to the right area. Thanks! sql*plus is array ...

PCI 6115 with DAQ toolbox
Hi all, Is there any way to disable the low-pass filter in PCI-6115 measurement card (or any) using the data acquisition toolbox? Thx Joonas ...

Can't embed python in C++(Mingw[3.*] compiler)
For thr program, #include "E:\Python25\include\Python.h" #include<iostream> int main(int argc, char* argv[]){ Py_Initialise(); Py_Finalise(); return 0; } I get the errors, main.cpp:7: `Py_Initialise' undeclared (first use this function) main.cpp:7: (Each undeclared identifier is reported only once for each function it appears in.) main.cpp:8: `Py_Finalise' undeclared (first use this function) Process terminated with status 1 (0 minutes, 1 seconds) I included "E:\Python25\include\Python.h" Also I think that when I use C instead of c++ errors di...

Accessing raw data from CD
My app needs to access raw data from a CD on a PC. This is easy under Linux as the device is a file, so I can use, for example, set fd [open /dev/cdrom r] This does not work under Windows set fd [open {d:} r] returns an 'access denied' error Ian Ian Bell wrote: > My app needs to access raw data from a CD on a PC. This is easy under Linux > as the device is a file, so I can use, for example, > > set fd [open /dev/cdrom r] > > This does not work under Windows > > set fd [open {d:} r] > > returns an 'access denied' error > > Ian tried...

A Query Expression That Works in Access 2000 But Not In Access 2003
I have the following query expression - Like Format(([Forms]![frmRunReports]![mm])) & "/*/" & ([Forms]! [frmRunReports]![yyyy]) which would translate to e.g. 04/*/2007 if someone is running a report for last month. The above expression is part of a Where clause for a date field. It works fine in Access 2000 and pulls out the appropriate # of records but in Access 2003, this expression (apparently) evaluates differently and no records are extracted. Is this an area that might've changed between Access 2000 and Access 2003 or ? Thanks for any suggestions and/or pointing...

gui axis window
I have a gui axis window in witch I'm displaying an image, I would like it to when a user clicks any where inside the the axis another image displays. Can any one help with this "Ken " <k.lrtzn@gmail.com> wrote in message <k9autg$3nh$1@newscl01ah.mathworks.com>... > I have a gui axis window in witch I'm displaying an image, I would like it to when a user clicks any where inside the the axis another image displays. Can any one help with this set(GUI_figure_handle, 'WindowButtonUpFcn', @display_image_function); ...

[News] [Rival] Windows Blogger Calls for Vista Complaints, Not Whines
We need less whining, more complaining about Vista ,----[ Quote ] | And if all you’re going to do is whine, you’re part of the problem instead of | being part of the solution. `---- http://blogs.zdnet.com/Bott/?p=288 Tech Shakedown #5: Microsoft justifies Vista’s forcing of unwanted reboots http://blogs.zdnet.com/Berlind/?p=733 Related: What made Kevin’s jaw hit the floor today? ,----[ Quote ] | So, to avoid running into this problem it would appear that you might need to | deploy Vista and give users Administrative rights.  (Don’t worry, I’m sure | users won’t do anything und...

Accessing body of an iframe, works in ie not in mozilla.
Javascript Folks, I am relatively new to javascript and am working on a script where I want to utilizes a couple of iframes and format text in them. I have run into a problem with getting the following code to work in mozilla. It seems to work in ie. Eventually I will be replacing the H1 node with a table until I can get the H1 node to show up in mozilla there is not much point. I have tested using both a javascript created iframe and one built in the html file. In both cases the iframes have an id of something_ifr. function lblifrBdy(id) { var ifr = document.getElementById(id+'_ifr&...

online datig service
online datig service .. .. .. ****Free Online Dating**** .. *******CLICK HERE******* http://dating365.co.cc/online-datig-service ***************************** .. ****Free Online Dating**** .. .. .. .. .. .. .. .. .. .. online datig service ...

how to edit .wsgi file extebtions with IDLE on windows
I can't figure out how to enable the .py shell and syntax highlighting for .wsgi file extensions using IDLE for windows ? En Fri, 28 Aug 2009 15:31:31 -0300, gert <gert.cuykens@gmail.com> escribi�: > I can't figure out how to enable the .py shell and syntax highlighting > for .wsgi file extensions using IDLE for windows ? That's a Windows question, not a Python one. You have to associate the ..wsgi extension with the Python.File file type (the one used for .py files): D:\USERDATA\Gabriel>assoc .py ..py=Python.File D:\USERDATA\Gabriel>assoc .wsgi=Python.Fi...

Running Access over Citrix
I am an Access developer and have done many Access databases in the standard Front-end on the workstations, backend on the server (over a LAN) but have never worked with Access over Citrix, though that situation is coming up for me shortly. Question: When you run the front-end on the Server, does Citrix clone the front end application database file for each user that connects or do they all connect to physically the same front-end file? The real question here is: If user1 adds rows to a table that is local in the front-end will user 2 be able to see those records (assuming they have the p...

Is it possible to update PCI 2.1 to PCI 2.2 by updating BIOS?
Dear all, Currently my motherboard only supports PCI 2.1. Is it possible to update PCI 2.1 to PCI 2.2 by updating BIOS? Thanks a million, Adrian You'll need to go to your Mobo manufacturer's web site for that one. -- Star Fleet Admiral Q @ your service -------------------------------------------------------- "Lee" <yxl4444@louisiana.edu> wrote in message news:5c3c88bc.0406170712.14db4bb2@posting.google.com... > Dear all, > > Currently my motherboard only supports PCI 2.1. Is it possible to > update PCI 2.1 to PCI 2.2 by updating BIOS? > > Thanks...

"Is C Still Relevant in the 21st Century?"
"Is C Still Relevant in the 21st Century?" http://news.dice.com/2014/12/08/c-still-relevant-21st-century/ "Many programming languages have come and gone since Dennis Ritchie devised C in 1972, and yet C has not only survived three major revisions, but continues to thrive. Large chunks of Windows were written in C, along with most of Linux." Lynn On Wednesday, December 10, 2014 7:17:38 PM UTC-5, Lynn McGuire wrote: > "Is C Still Relevant in the 21st Century?" interesting question, but, the answer must be yes. as long as there are a s= ignific...

Calling C++ / MFC / SDKs usinf Inline
Hello I have written the following program ----------------------------------------------------------------- use Inline C => DATA => LIBS => '-lE:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\clregistrywrapper'; $text = "@ARGV" || 'Inline.pm works with MSWin32. Scary...'; WinBox('Inline Text Box', $text); __END__ __C__ #include "E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest3\CLRegistry.h" int WinBox(char* Caption, char* Text) { const CString& entryName = "HKEY_...

Looking for an USB PCI Card for my Ultra 10
I'm in desperate need of two USB ports for my Solaris 8 server. I heard that Belkin PCI Host Adapter cards might work best. Can anybody confirm that http://catalog.belkin.com/IWCatProductPage.process?Merchant_Id=&Product_Id=103992 works on my machine ? Or does anybody know a cheaper solution because the cheapest price i found is US$ 44 + 29 (shipping) which is more then i paid for the Ultra 10 itself. Do Belkins newer USB 2.0 versions work on Sparc Solaris 8 ? In article <1142418050.943391.153380@j33g2000cwa.googlegroups.com>, "llothar" <llothar@web.de> wrot...

ACE on Windows platform
Hi, We are in the process of porting a legacy app to multiple platforms. The platforms are Solaris,Linux,Windows,MAC. I would like to know if ACE is supported on the windows platform and if so are there any examples. The competing choice is POCO, can someone differentiate between the two. Thanks -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Yes, we support windows, if you check all ACE examples/tests, they are run on the platforms you gave. I don't have experience with poco, I do someone at our office who used it for another project we did for a customer, but he is ...

build c++ library
How do you build a c++ library where you only want to export a small subset of the public functions? Do you use ar? Any help is appreciated. Donnie Fuqua -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- Donnie Fuqua <dfuqua@awesomenet.net> wrote: > How do you build a c++ library where you only want to > export a small subset of the public functions? Do you use > ar? You would use ar if you want to built a lib...

US-TX-Austin: DSP Algorithim Developer, Design/develop embedded systems, C; Perm (45347032410)
US-TX-Austin: DSP Algorithim Developer, Design/develop embedded systems, C; Perm (45347032410) ============================================================================================== Position: DSP Algorithim Developer Reference: SMC01902 Location: Austin TX Duration: perm Skills: REQUIREMENTS: Minimum 7 years design and development on algorithms for embedded systems. Expert C programmer Expert assembly programmer Core developer on at least 3 audio, video, or still image ...

Linking Matlab Compiler to Visual C++ compiler ???
I am using Matlab 2010 and VS2010. I have the Matlab Compiler Runtime installed in my system. Whenever if run command mcc -setup I get only one compiler lcc. This compiler gives a lot of errors when used to build a C++ shared library using deployment tool. It builds only C Shared libraries correctly. Can I also connect VC++ compiler with MCC ???? How should I do that ?? "Animesh Pandey" <apanimesh061@gmail.com> wrote in message news:kbn14j$1la$1@newscl01ah.mathworks.com... > I am using Matlab 2010 and VS2010. I have the Matlab Compiler Runtime > installed...

Dual Port RAM: Different Bus Sizes?
Hi: I'm trying to define a dual port ram device with a 16kx16bit bus and a 32Kx8bit bus referring to the same memory. The following gets the job done- but it uses a mux to select 8 of 16 for the 8 bit data bus. I'm using a Xilinx part and I understand the ram blocks can be setup with different bus aspect ratios. Is there a way to convince the synthesiser to do this in plain old verilog, without resorting to direct instantiation of the Xilinx ram block primitive? I'm a newbie to verilog- so I hope this isn't a dumb question. Thanks, Jason H. module system...

Client Access V5R1 issue
Hello, I'm hoping that someone can help. We are using Client Access to perform SQL against an AS/400 DB2 database (V5R1). One of the tables we update has a trigger on it that performs some required function for our enterprise system. When the SQL is executed by Client Access the trigger fails, reporting that the trigger can not find a specified RPG program. The trigger is working correclty when the table with the trigger is updated by the enterprise system RPG code. The triger only fails when a SQL statement like : Insert into <table> Values(<val1>,<val2>) is exec...

[p,pci]=mle(...) yields complex pci
Hi, I am using the matlab mle function with a custom pdf and cdf, without censoring and customized statset, mainly to set a correct DerivStep. [p,pci]=mle(...) yields a pci which has a imaginary component. What am I doing wrong? (Could it be that the found Jacobian is invalid?) Regards Alexander Kemp Alexander Kemp: <SNIP <mle> conundrum... > [p,pci]=mle(...) > yields a pci which has a imaginary component... it would be helpful if you could expand the ominous <...> us The ominous <...> contains a series development after Physical Reviev B, Volume 51,...