none
GetBusData RRS feed

  • Question

  • I am developing a WDF driver for a PCI based controller. IN this driver I need to access the PCI config space  to find out the device ID of the controller. For this i am sending a request to PCI bus driver. I am writing the following code for this.

    BUS_INTERFACE_STANDARD Pci_interface;

    Pci_interface.GetBusData(DeviceContext,IRP_MN_READ_CONFIG,&ulDeviceId,PCI_WHICHSPACE_CONFIG,4);

    Do i need to initialize the Pci_interface structure before i can call the function GetBusData?? If yes how should the Pci_interface structure be initialized?



    vidyasagar196

    Tuesday, June 10, 2014 8:36 AM

Answers

  • Use IoGetDeviceProperty to get the device ID.  Why do you think you need this, unless your controller is supporting a number of different devices this is rarely used, since the OS will do the device matching for you.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Tuesday, June 10, 2014 10:39 AM