CM_Set_DevNode_Problem function (cfgmgr32.h)

The CM_Set_DevNode_Problem function sets a problem code for a device that is installed in a local machine.

Syntax

CMAPI CONFIGRET CM_Set_DevNode_Problem(
  [in] DEVINST dnDevInst,
  [in] ULONG   ulProblem,
  [in] ULONG   ulFlags
);

Parameters

[in] dnDevInst

Caller-supplied device instance handle that is bound to the local machine.

[in] ulProblem

Supplies a problem code, which is zero or one of the CM_PROB_Xxx flags that are described in Device Manager Error Messages. A value of zero indicates that a problem is not set for the device.

[in] ulFlags

Must be set to zero.

Return value

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, the function returns one of the CR_-prefixed error codes that are defined in Cfgmgr32.h.

Remarks

Use this function to set a problem code for a device that is installed in a local machine. You can also use the following functions to set a device's problem code and to obtain the problem code set for the device:

For information about using device instance handles that are bound to the local machine, see CM_Get_Child.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Desktop
Header cfgmgr32.h (include Cfgmgr32.h)
Library Cfgmgr32.lib
DLL Cfgmgr32.dll

See also

CM_Get_Child

CM_Get_DevNode_Status

CM_Get_DevNode_Status_Ex

CM_Set_DevNode_Problem_Ex