![]() |
| | #1 |
| Registered User Join Date: Nov 2007
Posts: 11
| A way to automatically detect the base address of a PCI card I have a program that interfaces with a PCI card and it works fine, except that the needed PCI base address either has to be hard-coded or entered by the user. Ideally I would prefer for the app to automatically detect the base address of the PCI card. Is there a way to do this? |
| binaryboy is offline | |
| | #2 |
| Guest Join Date: Aug 2001
Posts: 5,035
| Well, first of all, if you plan to use the address directly, don't bother - Windows won't let you directly access it, and even so, it can remap those kinds of things dynamically, anyway, so a physical address is practically useless. That said, Windows does have a standard interface for accessing hardware via IOCTL commands, though I have no idea what exactly would be needed to get access to the PCI card and it's statistics. Good luck. |
| Sebastiani is offline | |
| | #3 | |
| Registered User Join Date: Nov 2007
Posts: 11
| Quote:
I know that the base address is prone to change. I'm sure that this value must be held somewhere and accessible so that upon start-up, the program would retrieve the address. Thanks anyway. | |
| binaryboy is offline | |
| | #4 |
| Registered User Join Date: Mar 2003
Posts: 3,903
| You can either use WMI or the SetupAPI. Both are equally fun. However, there are more examples using SetupAPI on the net - http://www.codeproject.com/KB/system/SimpleSetup.aspx gg |
| Codeplug is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Base Converter Part 2 | encyclopedia23 | C Programming | 2 | 12-30-2006 02:42 PM |
| Bit Computation Program | cisokay | C++ Programming | 6 | 05-13-2005 09:32 PM |
| How to change number data from base 256 to base 16? | ooosawaddee3 | C++ Programming | 2 | 11-05-2002 12:19 AM |
| Virtual Base Class & Constructor :: C++ | kuphryn | C++ Programming | 2 | 09-13-2002 03:14 PM |
| module base address | cppdude | Windows Programming | 2 | 03-29-2002 06:14 PM |