alle hardware-PNPs des systems ermitteln
Verfasst: 28.01.2005 19:06
anhand der PNPs wird die hardware des systemes "sichtbar":
im prinzip all das , was unter HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum aktiv ist .
Code: Alles auswählen
#DIGCF_PRESENT = 2
#DIGCF_ALLCLASSES = 4
hDeviceInfoSet = SetupDiGetClassDevs_(0,0,0,#DIGCF_PRESENT|#DIGCF_ALLCLASSES)
Structure SP_DEVINFO_DATA
cbSize.l
ClassGuid.GUID
DevInst.l
Reserved.l
EndStructure
DeviceInfoData.SP_DEVINFO_DATA
DeviceInfoData\cbSize=SizeOf(DeviceInfoData)
i=0
OpenLibrary(1,"cfgmgr32.dll")
*F1 = IsFunction(1, "CM_Get_Device_IDA")
Repeat
If SetupDiEnumDeviceInfo_(hDeviceInfoSet,i,@DeviceInfoData) = 0
Break
EndIf
i+1
pnplen = 255
pnp.s = Space(bufferlen)
CallFunctionFast(*F1,DeviceInfoData\DevInst,@pnp,pnplen,0)
Debug pnp
ForEver
CloseLibrary(1)
SetupDiDestroyDeviceInfoList_(hDeviceInfoSet)