How to access a custom PCI device from a user app

  • Thread starter Thread starter sunilnayak10
  • Start date Start date
S

sunilnayak10

I am working on my university project and if you could please help me.

I have my pci device plugged into one of the open PCI slots.

I am looking for a way to scan the pci bus for the device using
win32 api (in a regular C program.)which can return a handle for
the device so that i can read/write to the device.

Are there any win32 api which can do this (bypassing the device
driver) .
thank you

sunil nayak
 
sunil,

I am not sure how you want to bypass the device driver on XP. In Win32 world it is not possible (better say, not easy) to work with
hardware directly. Some other 3rd party applications like DirectIO (http://www.direct-io.com) may help you to work with some type of
hardware directly but keep in mind that DirectIO include its own driver.

I guess you may want to write a driver to support the hardware.
Check out Windows DDK documentation to get familiar with driver development and access to hardware on 2K and XP.

From Win32 level you can always query the device (driver) via WMI or direct interface if exists.
 
sunil,

I am not sure how you want to bypass thedevicedriver on XP. In Win32 world it is not possible (better say, not easy) to work with
hardware directly. Some other 3rd party applications like DirectIO (http://www.direct-io.com) may help you to work with some type of
hardware directly but keep in mind that DirectIO include its own driver.

I guess you may want to write a driver to support the hardware.
Check out Windows DDK documentation to get familiar with driver development andaccessto hardware on 2K and XP.

From Win32 level you can always query thedevice(driver) via WMI or direct interface if exists.

driver development could be quiet complex.
What i am looking for is a specific win32 API function which can
write to the device and read from it.Here the physical address for
read/write is given.
 
What might be possible is to just read the Registry to find the devices
instead of accessing the hardware directly.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit
 
Back
Top