Tech Support > Microsoft Windows > Drivers > Re: How to get PCI bus number and Func ID
Re: How to get PCI bus number and Func ID
Posted by Maxim S. Shatskih on October 2nd, 2003


Then 2 PnP devnodes will be created for the board, and possibly 2 drivers -
provided you mean the 2 "functions" according to PCI spec definitions.

If you want to use the same driver binary for both functions - then you can use
IoGetDeviceProperty/DevicePropertyAddress to get the function number you're
running on. The address is 32bit value, the device number in high bits, and
function number in low bits.

Look at article KB253232 for code sample.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com




Similar Posts