CM_Set_Device_Interface_Property function

The CM_Set_Device_Interface_Property function sets a device property of a device interface.

Syntax


CMAPI
CONFIGRET
WINAPI CM_Set_Device_Interface_Property(
  _In_       LPCWSTR     pszDeviceInterface,
  _In_ const DEVPROPKEY  *PropertyKey,
  _In_       DEVPROPTYPE *PropertyType,
  _In_ const PBYTE       PropertyBuffer,
  _In_       ULONG       PropertyBufferSize,
  _In_       ULONG       ulFlags
);

Parameters

pszDeviceInterface [in]

Pointer to a string that identifies the device interface instance for which to set a property for.

PropertyKey [in]

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

PropertyType [in]

A DEVPROPTYPE-typed value that represents the property-data-type identifier for the device interface property. To delete a property, this must be set to DEVPROP_TYPE_EMPTY.

PropertyBuffer [in]

Pointer to a buffer that contains the property value of the device interface property. If either the property or the data is being deleted, this pointer must be set to NULL, and PropertyBufferSize must be set to zero.

PropertyBufferSize [in]

The size, in bytes, of the PropertyBuffer buffer. If PropertyBuffer is set to NULL, PropertyBufferSize must be set to zero.

ulFlags [in]

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.

Remarks

CM_Set_Device_Interface_Property is part of the Unified Device Property Model.

Requirements

Target platform

Universal

Version

Available in Microsoft Windows Vista and later versions of Windows.

Header

Cfgmgr32.h (include Cfgmgr32.h)

Library

Cfgmgr32.lib

Unicode and ANSI names

CM_Set_Device_Interface_PropertyW (Unicode)

See also

SetupDiSetDeviceInterfaceProperty

 

 

Send comments about this topic to Microsoft

Show: