CM_Get_DevNode_Registry_PropertyW function

The CM_Get_DevNode_Registry_Property function retrieves a specified device property from the registry.

Syntax

CMAPI CONFIGRET CM_Get_DevNode_Registry_PropertyW(
  DEVINST dnDevInst,
  ULONG   ulProperty,
  PULONG  pulRegDataType,
  PVOID   Buffer,
  PULONG  pulLength,
  ULONG   ulFlags
);

Parameters

dnDevInst

A caller-supplied device instance handle that is bound to the local machine.

ulProperty

A CM_DRP_-prefixed constant value that identifies the device property to be obtained from the registry. These constants are defined in Cfgmgr32.h.

pulRegDataType

Optional, can be NULL. A pointer to a location that receives the registry data type, specified as a REG_-prefixed constant defined in Winnt.h.

Buffer

Optional, can be NULL. A pointer to a caller-supplied buffer that receives the requested device property. If this value is NULL, the function supplies only the length of the requested data in the address pointed to by pulLength.

pulLength

A pointer to a ULONG variable into which the function stores the length, in bytes, of the requested device property.

If the Buffer parameter is set to NULL, the ULONG variable must be set to zero.

If the Buffer parameter is not set to NULL, the ULONG variable must be set to the length, in bytes, of the caller-supplied buffer.

ulFlags

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 that are defined in Cfgmgr32.h.

Remarks

For information about how to use device instance handles that are bound to the local machine, see CM_Get_Child.

Requirements

   
Minimum supported client Available starting with Microsoft Windows 2000.
Target Platform Universal
Header cfgmgr32.h (include Cfgmgr32.h)
Library Cfgmgr32.lib

See Also

CM_Get_Child

CM_Set_DevNode_Registry_Property

SetupDiGetDeviceRegistryProperty