Hi,
in the past my (WDM based) driver needed to extract the pci bus number and
the slot (device - i.e the location on the bus) number for a device. this was
easy to do using the HalGetBusData routines.
nowdays, these routine are obsolete and my new driver is WDF based. though,
i still need to get these numbers (bus & slot(device) numbers) and having
trouble with the device number.
using the WDF routine "WdfDeviceAllocAndQueryProperty" i'm able to retrieve
the bus number easily using the "DevicePropertyBusNumber" prperty. BUT,
extracting the slot(device) number is something i cant figure out (i can only
get it by using the WdfDeviceAllocAndQueryProperty routine with a
DevicePropertyLocationInformation attribute but then i have to parse a string
which not seems like a good way).
so, my question is how is the best way to replace the HalGetBusData routine
for extracting a devices slot(device) number. can i somehoe use the
PCI_SLOT_NUMBER structure along with "IRP_MN_READ_CONFIG" ?
thanks a lot,
kobi.