[KMDF] How to Retrieve the PCIe device ID in EVT_WDF_DRIVER_DEVICE_ADD method RRS feed

  • Question

  • Hi Team,

    I want to retrieve the PCIe device ID of the device triggered EVT_WDF_DRIVER_DEVICE_ADD callback function.

    In my design, i have two types of devices and each device need to be treated differently. each type of device has unique device ID. Hence i want to segregate the operations (pnp call backs, io queue method initialization) based on the PCIe device ID.

    I have browsed msdn pages and found BUS_INTERFACE_STANDARD structure and WdfFdoQueryForInterface() API but these needs a proper WDFDEVICE need to be passed as argument, but the WDFDEVICE will not not get created at that time (i want to create WDFDEVICE after finding the PCI Device ID.

    Please help me.

    Thanks & Regards,

    Satya Pavan Kiran Prerepa.

    Thursday, November 21, 2019 2:11 PM