CM_Set_Device_Interface_PropertyW function (cfgmgr32.h)

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

Syntax

CMAPI CONFIGRET CM_Set_Device_Interface_PropertyW(
  [in] LPCWSTR          pszDeviceInterface,
  [in] const DEVPROPKEY *PropertyKey,
  [in] DEVPROPTYPE      PropertyType,
  [in] const PBYTE      PropertyBuffer,
  [in] ULONG            PropertyBufferSize,
  [in] ULONG            ulFlags
);

Parameters

[in] pszDeviceInterface

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

[in] PropertyKey

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

[in] PropertyType

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.

[in] PropertyBuffer

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.

[in] PropertyBufferSize

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

[in] ulFlags

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

Requirement Value
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

SetupDiSetDeviceInterfaceProperty