Re: enumerating PCI devices under Windows

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Maxim S. Shatskih (maxim_at_storagecraft.com)
Date: 02/20/04


Date: Fri, 20 Feb 2004 21:24:05 +0300


> Lets suppose that the appropriate drivers for the devices are already
> loaded. And device objects are created.
> My aim is to find them (by enumerating the PCI Bus - like HalGetBusData
> under WinNT) , their devices objects and manipulate them.

For each device object, call IoRegisterDeviceInterface and then
IoSetDeviceInterfaceState.

Then, in user mode, SetupDiGetClassDevs/SetupDiGetDeviceInterfaceDetail will
help you. It will return a string suitable for CreateFile.

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


Relevant Pages

  • [PATCH 0/4] PM: Do not destroy/create devices while suspended (rev. 2)
    ... Some device drivers register CPU hotplug notifiers and use them to destroy ... Unfortunately, this is not the right thing to do during suspend/hibernation, ... The solution is to prevent drivers from removing/adding devices from within ... remove device objects corresponding to suspended devices on their behalf. ...
    (Linux-Kernel)
  • Re: [PATCH 0/3] PM: Do not destroy/create devices while suspended
    ... Some device drivers register CPU hotplug notifiers and use them to destroy ... device objects when removing the corresponding CPUs and to create these objects ... Unfortunately, this is not the right thing to do during suspend/hibernation, ... The solution is to prevent drivers from removing/adding devices from within ...
    (Linux-Kernel)