CM_Add_ID_ExA function (cfgmgr32.h)
[Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Add_ID instead.]
The CM_Add_ID_Ex function appends a device ID (if not already present) to a device instance's hardware ID list or compatible ID list, on either the local or a remote machine.
Syntax
CMAPI CONFIGRET CM_Add_ID_ExA(
DEVINST dnDevInst,
PSTR pszID,
ULONG ulFlags,
HMACHINE hMachine
);
Parameters
dnDevInst
Caller-supplied device instance handle that is bound to the machine handle supplied by hMachine.
pszID
Caller-supplied pointer to a NULL-terminated device ID string.
ulFlags
Caller-supplied flag constant that specifies the list onto which the supplied device ID should be appended. The following flag constants are valid.
Flag Constant | Definition |
---|---|
CM_ADD_ID_COMPATIBLE | The specified device ID should be appended to the specific device instance's compatible ID list. |
CM_ADD_ID_HARDWARE | The specified device ID should be appended to the specific device instance's hardware ID list. |
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
Each appended device ID is considered less compatible than IDs already existing in the specified list. For information about device IDs, hardware IDs, and compatible IDs, see Device Identification Strings.
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 |