Discussion:
Device Manager state
(too old to reply)
Kid
2010-09-28 07:49:03 UTC
Permalink
Hi

Is there some API to check and enumerate "!" "?" "X" device state in
device manager ? What do these states mean and where can I query the error
codes ?

Thank you .
PavelA
2010-09-28 15:25:46 UTC
Permalink
Post by Kid
Hi
Is there some API to check and enumerate "!" "?" "X" device state in
device manager ? What do these states mean and where can I query the error
codes ?
This can be received from SetupDiGetDeviceProperty,
The properties are DEVPKEY_Device_DevNodeStatus, DEVPKEY_Device_ProblemCode

For XP - call CM_Get_DevNode_Status. The device instance can be obtained
from SetupDiEnumDeviceInfo, in SP_DEVINFO_DATA.DevInst.

The problem codes are CM_PROB... defined in cfg.h
For example, the notorious error 10 is CM_PROB_FAILED_START,
error 12 (no resources) is CM_PROB_NORMAL_CONFLICT, 22 is CM_PROB_DISABLED.

Hope this helps.
-- pa

Loading...