CM_Get_DevNode_Registry_Property (6 Parameters) function
[CM_Get_DevNode_Registry_Property is available for use in Windows 2000 and Windows XP. It may be altered or unavailable in subsequent versions. Applications should use the SetupDiGetDeviceRegistryProperty function.]
The CM_Get_DevNode_Registry_Property function retrieves a specified device property from the registry.
DWORD CM_Get_DevNode_Registry_Property(
DEVINST dnDevInst,
ULONG ulProperty,
PULONG pulRegDataType,
PVOID Buffer,
PULONG pulLength,
ULONG ulFlags
);
Parameters
- dnDevInst
[in] Handle to the device instance. - ulProperty
[in] Device property to be retrieved. See the C M_DRP_* constants defined in Cfgmgr32.h. - pulRegDataType
[out, optional] Pointer to a variable that receives the registry data type. This parameter can be NULL. - Buffer
[out, optional] Pointer to a buffer that receives the requested device property. If this parameter is NULL, the function supplies only the length of the requested data in pulLength. - pulLength
[in, out] Pointer to a variable that receives the size of the requested device property, in bytes. - ulFlags
[in] Not used, must be zero.
Return Value
If the function succeeds, the return value is CR_SUCCESS. Otherwise, the return value is one of the following error codes:
CR_BUFFER_SMALL
CR_INVALID_DEVINST
CR_INVALID_FLAG
CR_INVALID_POINTER
CR_NO_SUCH_REGISTRY_KEY
CR_NO_SUCH_VALUE
CR_REGISTRY_ERROR
Requirements
| Client | Requires Windows XP or Windows 2000 Professional. |
| Server | Requires Windows Server 2003 or Windows 2000 Server. |
| Header | Declared in Cfgmgr32.h. |
| Library | Use Setupapi.lib. |
| DLL | Requires Setupapi.dll. |
| Unicode | Implemented as CM_Get_DevNode_Registry_PropertyW (Unicode) and CM_Get_DevNode_Registry_PropertyA (ANSI). |
See Also
Device Management Functions
SetupDiGetDeviceRegistryProperty