Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The CM_Setup_DevNode function restarts a device instance that is not running because there is a problem with the device configuration.
CMAPI CONFIGRET CM_Setup_DevNode(
[in] DEVINST dnDevInst,
[in] ULONG ulFlags
);
[in] dnDevInst
A device instance handle that is bound to the local system.
[in] ulFlags
One of the following flag values:
Restarts a device instance that is not running because of a problem with the device configuration.
Resets a device instance that has the no restart device status flag set. The no restart device status flag is set if a device is removed by calling CM_Query_And_Remove_SubTree or CM_Query_And_Remove_SubTree_Ex and specifying the CM_REMOVE_NO_RESTART flag.
If the operation succeeds, the function returns CR_SUCCESS. Otherwise it returns one of the error codes with "CR_" prefix that are defined in Cfgmgr32.h.
Device installation applications should use the DIF_PROPERTYCHANGE request to restart a device instead of using this function. The DIF_PROPERTYCHANGE request can be used to enable, disable, restart, stop, or change the properties of a device.
If a device instance does not have a problem and is already started, CM_Setup_DevNode returns without changing the status of the device instance.
Call CM_Get_DevNode_Status or CM_Get_DevNode_Status_Ex to determine the status and problem code for a device instance.
Requirement | Value |
---|---|
Minimum supported client | Available in Microsoft Windows 2000 and later versions of Windows. |
Target Platform | Universal |
Header | cfgmgr32.h (include Cfgmgr32.h) |
Library | Cfgmgr32.lib; OneCoreUAP.lib on Windows 10 |
DLL | CfgMgr32.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today