CM_Get_Device_Interface_PropertyW function

The CM_Get_Device_Interface_Property function retrieves a device property that is set for a device interface.


CMAPI CONFIGRET CM_Get_Device_Interface_PropertyW(
  LPCWSTR          pszDeviceInterface,
  const DEVPROPKEY *PropertyKey,
  DEVPROPTYPE      *PropertyType,
  PBYTE            PropertyBuffer,
  PULONG           PropertyBufferSize,
  ULONG            ulFlags



Pointer to a string that identifies the device interface instance to retrieve the property from.


Pointer to a DEVPROPKEY structure that represents the device interface property key of the device interface property to retrieve.


Pointer to a DEVPROPTYPE-typed variable that receives the property-data-type identifier of the requested device interface property. The property-data-type identifier is a bitwise OR between a base-data-type identifier and, if the base-data type is modified, a property-data-type modifier.


A pointer to a buffer that receives the requested device interface property. CM_Get_Device_Interface_Property retrieves the requested property only if the buffer is large enough to hold all the property value data. The pointer can be NULL.


The size, in bytes, of the PropertyBuffer buffer. If PropertyBuffer is set to NULL, *PropertyBufferSize must be set to zero. As output, if the buffer is not large enough to hold all the property value data, CM_Get_Device_Interface_Property returns the size of the data, in bytes, in *PropertyBufferSize.


Reserved. Must be set to 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.


CM_Get_Device_Interface_Property is part of the Unified Device Property Model.


Minimum supported client Available in Microsoft Windows Vista and later versions of Windows.
Target Platform Universal
Header cfgmgr32.h (include Cfgmgr32.h)
Library Cfgmgr32.lib

See Also