HOW TO WRITE DRIVER CODE TO DETECT PCI DEVICE AND BAR REGISTERS

sir,
I am working on PCI Windows Driver programming using vc++. How to write windows driver code for read and write functions to access BAR registers and how to detect PCI device from driver code.


Flying to Bangalore or Bhopal? Search for tickets here.

I suggest you to follow one of the samples from the DDK/WDK. For a PCI device, please look at the pcidrv sample. In practice in a driver for a PnP device (which is what you have), the OS notifies you that the device is available and the resources that the board exposes (interrupts, memory and such).

Also, what do you mean by “i’m using VC++”? You need to use the WDK environment to build your driver (in practice the build.exe utility). Do not try to compile the driver with the normal VC++ compiler. It’s a good recipe for a disaster. You can definitely use VC (or any other editor) to write and edit your code. But stick with the WDK build environment to compile it.

Also, if you are new to driver development, i strongly suggest you to develop your PCI driver with KMDF, the new framework to develop drivers available in the WDK.

Have a nice day
GV


Gianluca Varenni, Windows DDK MVP

CACE Technologies
http://www.cacetech.com

----- Original Message -----
From: rajesh kumar
To: Windows System Software Devs Interest List
Sent: Friday, November 23, 2007 11:35 PM
Subject: [ntdev] HOW TO WRITE DRIVER CODE TO DETECT PCI DEVICE AND BAR REGISTERS

sir,
I am working on PCI Windows Driver programming using vc++. How to write windows driver code for read and write functions to access BAR registers and how to detect PCI device from driver code.


Flying to Bangalore or Bhopal? Search for tickets here. — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer