CM_Get_Device_ID_Size function
The CM_Get_Device_ID_Size function retrieves the buffer size required to hold a device instance ID for a device instance on the local machine.
Syntax
CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size( _Out_ PULONG pulLen, _In_ DEVINST dnDevInst , _In_ ULONG ulFlags );
Parameters
- pulLen [out]
-
Receives a value representing the required buffer size, in characters.
- dnDevInst [in]
-
Caller-supplied device instance handle that is bound to the local machine.
- ulFlags [in]
-
Not used, must be zero.
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
The CM_Get_Device_ID_Size function should be called to determine the buffer size required by CM_Get_Device_ID.
The size value supplied in the location pointed to by pulLen is less than MAX_DEVICE_ID_LEN, and does not include the identifier string's terminating NULL. If the specified device instance does not exist, the function supplies a size value of zero.
For information about device instance IDs, see Device Identification Strings.
For information about using device instance handles that are bound to the local machine, see CM_Get_Child.
Requirements
|
Target platform | |
|---|---|
|
Version |
Available in Microsoft Windows 2000 and later versions of Windows. |
|
Header |
|
|
Library |
|
|
DLL |
|
See also