Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定 PCI 设备的地址(即总线、设备、功能),如何在用户空间中使用 Win32 API 调用以编程方式读取该设备的配置空间(例如供应商 ID、设备 ID)?
在 Linux 上,打开 /sys/bus/pci/devices//config 文件并从正确的偏移量读取。
您可以使用SetupDiGetClassDevs API 遍历设备列表。如果传入参数,PCI则Enumerator只能枚举 PCI 设备。
PCI
Enumerator