Hi all,
anyone could tell me how to write a c++ builder program which can dectect PCI bus device and also how can I send a piece of data out and receive back so that I know that the PCI is working fine !!
any answer would be appreciated.
Hi all,
anyone could tell me how to write a c++ builder program which can dectect PCI bus device and also how can I send a piece of data out and receive back so that I know that the PCI is working fine !!
any answer would be appreciated.
Well... that's going to depend on your hardware platform, your operating system, and maybe the specific device your're trying to "detect".
If you're using windows, you might post the question on the windows board. (Try to be specific about what you mean by "detect", and what type of device you want to detect.) Just about everything related to windows programming is "difficult"... Just a warning in case you're a beginning programmer.
If you're using windows, the OS should have already detected the device, and maybe you can query the registry to get the information. (Ask on the windows board how to do this.)
Windows tries to insulate you from the hardware. With windows XP, you have to get into the kernel mode to read/write the hardware. I have a driver book, but still haven't learned how to do this.
thx bud
You need ring 1 access to hardware in order to manipulate it, or communicate with it, at such a low level. You can do this by creating a service, or else you can use a driver. One Driver that allows Ring1 access is called PortTalk, which comes with source code and you may find it here: http://www.beyondlogic.org (you need Microsoft Windows DDK to compile the Driver, VC/C++ 6.0/.NET cannot compile drivers)
I hope this helps solve the hardware issue before you encounter the "Privileged Access Fault" errors, which will happen even if you use ASM to communicate to the hardware via 'in' and 'out'. Good luck.
thanks Xei