CM_Set_DevNode_Property
TOC
Collapse the table of content
Expand the table of content

CM_Set_DevNode_Property function

The CM_Set_DevNode_Property function sets a device instance property.

Syntax


CMAPI
CONFIGRET
WINAPI CM_Set_DevNode_Property(
  _In_       DEVINST     dnDevInst,
  _In_ const DEVPROPKEY  *PropertyKey,
  _In_       DEVPROPTYPE PropertyType,
  _In_ const PBYTE       PropertyBuffer,
  _In_       ULONG       PropertyBufferSize,
  _In_       ULONG       ulFlags
);

Parameters

dnDevInst [in]

Device instance handle that is bound to the local machine.

PropertyKey [in]

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

PropertyType [in]

A DEVPROPTYPE-typed value that represents the property-data-type identifier for the device instance 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 instance 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

This function is reserved for system use. Do not use this function in your class installers, co-installers, or device installation applications. Use SetupDiSetDeviceProperty instead.

CM_Set_DevNode_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_DevNode_PropertyW (Unicode)

See also

SetupDiSetDeviceProperty

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft