#include <SetupApi.au3>
Local $sDeviceID, $hDevInst, $iStatus, $sProblem, $sStatus
$sDeviceID = "ACPI\ACPI0003\2&DABA3FF&0"
$hDevInst = _CM_Locate_DevNode($sDeviceID)
$iStatus = _CM_Get_DevNode_Status($hDevInst)
$sProblem = _CM_Query_Device_Problem($hDevInst)
If bitAND($iStatus, 1) = 1 Then $sStatus &= "DN_ROOT_ENUMERATOR" & @LF
If bitAND($iStatus, 2) = 2 Then $sStatus &= "DN_DRIVER_LOADED" & @LF
If bitAND($iStatus, 4) = 4 Then $sStatus &= "DN_ENUM_LOADED" & @LF
If bitAND($iStatus, 8) = 8 Then $sStatus &= "DN_STARTED" & @LF
If bitAND($iStatus, 16) = 16 Then $sStatus &= "DN_MANUAL" & @LF
If bitAND($iStatus, 32) = 32 Then $sStatus &= "DN_NEED_TO_ENUM" & @LF
If bitAND($iStatus, 64) = 64 Then $sStatus &= "DN_NOT_FIRST_TIME" & @LF
If bitAND($iStatus, 128) = 128 Then $sStatus &= "DN_HARDWARE_ENUM" & @LF
If bitAND($iStatus, 256) = 256 Then $sStatus &= "DN_NEED_RESTART" & @LF
If bitAND($iStatus, 512) = 512 Then $sStatus &= "DN_HAS_MARK" & @LF
If bitAND($iStatus, 1024) = 1024 Then $sStatus &= "DN_HAS_PROBLEM" & @LF
If bitAND($iStatus, 2048) = 2048 Then $sStatus &= "DN_FILTERED" & @LF
If bitAND($iStatus, 4096) = 4096 Then $sStatus &= "DN_MOVED" & @LF
If bitAND($iStatus, 0x2000) = 0x2000 Then $sStatus &= "DN_DISABLEABLE" & @LF
If bitAND($iStatus, 0x4000) = 0x4000 Then $sStatus &= "DN_REMOVABLE" & @LF
If bitAND($iStatus, 0x8000) = 0x8000 Then $sStatus &= "DN_PRIVATE_PROBLEM" & @LF
If bitAND($iStatus, 0x10000) = 0x10000 Then $sStatus &= "DN_MF_PARENT" & @LF
If bitAND($iStatus, 0x20000) = 0x20000 Then $sStatus &= "DN_MF_CHILD" & @LF
If bitAND($iStatus, 0x40000) = 0x40000 Then $sStatus &= "DN_WILL_BE_REMOVED" & @LF
If bitAND($iStatus, 0x80000) = 0x80000 Then $sStatus &= "DN_NOT_FIRST_TIMEE" & @LF
If bitAND($iStatus, 0x100000) = 0x100000 Then $sStatus &= "DN_STOP_FREE_RES" & @LF
If bitAND($iStatus, 0x200000) = 0x200000 Then $sStatus &= "DN_REBAL_CANDIDATE" & @LF
If bitAND($iStatus, 0x400000) = 0x400000 Then $sStatus &= "DN_BAD_PARTIAL" & @LF
If bitAND($iStatus, 0x800000) = 0x800000 Then $sStatus &= "DN_NT_ENUMERATOR" & @LF
If bitAND($iStatus, 0x1000000) = 0x1000000 Then $sStatus &= "DN_NT_DRIVER" & @LF
If bitAND($iStatus, 0x2000000) = 0x2000000 Then $sStatus &= "DN_NEEDS_LOCKING" & @LF
If bitAND($iStatus, 0x4000000) = 0x4000000 Then $sStatus &= "DN_ARM_WAKEUP" & @LF
If bitAND($iStatus, 0x8000000) = 0x8000000 Then $sStatus &= "DN_APM_ENUMERATOR"&@LF
If bitAND($iStatus, 0x10000000) = 0x10000000 Then $sStatus &= "DN_APM_DRIVER" & @LF
If bitAND($iStatus, 0x20000000) = 0x20000000 Then $sStatus &= "DN_SILENT_INSTALL" & @LF
If bitAND($iStatus, 0x40000000) = 0x40000000 Then $sStatus &= "DN_NO_SHOW_IN_DM" & @LF
If bitAND($iStatus, 0x80000000) = 0x80000000 Then $sStatus &= "DN_BOOT_LOG_PROB" & @LF
Msgbox(0, $sDeviceID, $sStatus & @LF & $sProblem)
|