CM_Reenumerate_DevNode_Ex function (cfgmgr32.h)
[Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Reenumerate_DevNode instead.]
The CM_Reenumerate_DevNode_Ex function enumerates the devices identified by a specified device node and all of its children.
Syntax
CMAPI CONFIGRET CM_Reenumerate_DevNode_Ex(
[in] DEVINST dnDevInst,
[in] ULONG ulFlags,
[in, optional] HMACHINE hMachine
);
Parameters
[in] dnDevInst
Caller-supplied device instance handle that is bound to the machine handle supplied by hMachine.
[in] ulFlags
Caller-supplied flags that specify how reenumeration should occur. This parameter can be set to a combination of the following flags, as noted:
CM_REENUMERATE_ASYNCHRONOUS
Reenumeration should occur asynchronously. The call to this function returns immediately after the PnP manager receives the reenumeration request. If this flag is set, the CM_REENUMERATE_SYNCHRONOUS flag should not also be set.
CM_REENUMERATE_NORMAL
Specifies default reenumeration behavior, in which reenumeration occurs synchronously. This flag is currently equivalent to CM_REENUMERATE_SYNCHRONOUS.
CM_REENUMERATE_RETRY_INSTALLATION
Specifies that Plug and Play should make another attempt to install any devices in the specified subtree that have been detected but are not yet configured, or are marked as needing reinstallation, or for which installation must be completed. This flag can be set along with either the CM_REENUMERATE_SYNCHRONOUS flag or the CM_REENUMERATE_ASYNCHRONOUS flag.
This flag must be used with extreme caution, because it can cause the PnP manager to prompt the user to perform installation of any such devices. Currently, only components such as Device Manager and Hardware Wizard use this flag, to allow the user to retry installation of devices that might already have been detected but are not currently installed.
CM_REENUMERATE_SYNCHRONOUS
Reenumeration should occur synchronously. The call to this function returns when all devices in the specified subtree have been reenumerated. If this flag is set, the CM_REENUMERATE_ASYNCHRONOUS flag should not also be set. This flag is currently equivalent to CM_REENUMERATE_NORMAL.
[in, optional] hMachine
Caller-supplied machine handle to which the caller-supplied device instance handle is bound.
Return value
If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
Remarks
If the specified device node represents a hardware or software bus device, the PnP manager queries the device's drivers for a list of children, then attempts to configure and start any child devices that were not previously configured. The PnP manager also initiates surprise-removal of devices that are no longer present (see IRP_MN_SURPRISE_REMOVAL).
Callers of this function must have SeLoadDriverPrivilege. (Privileges are described in the Microsoft Windows SDK documentation.)
For information about using device instance handles that are bound to a local or a remote machine, see CM_Get_Child_Ex.
Functionality to access remote machines has been removed in Windows 8 and Windows Server 2012 and later operating systems thus you cannot access remote machines when running on these versions of Windows.
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 |