Device Manager state

Discussion in 'Windows Vista Drivers' started by Kid, Sep 28, 2010.

  1. Kid

    Kid Guest


    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 .
    Kid, Sep 28, 2010
    1. Advertisements

  2. Kid

    PavelA Guest

    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
    PavelA, Sep 28, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.