CM_Set_Class_Property function
The CM_Set_Class_Property function sets a class property for a device setup class or a device interface class.
Syntax
CMAPI CONFIGRET WINAPI CM_Set_Class_Property( _In_ LPCGUID ClassGUID, _In_ const DEVPROPKEY *PropertyKey, _In_ DEVPROPTYPE PropertyType, _In_ const PBYTE PropertyBuffer, _In_ ULONG PropertyBufferSize, _In_ ULONG ulFlags );
Parameters
- ClassGUID [in]
-
Pointer to the GUID that identifies the device interface class or device setup class for which to set a device property. For information about specifying the class type, see the ulFlags parameter.
- PropertyKey [in]
-
Pointer to a DEVPROPKEY structure that represents the property key of the device class property to set.
- PropertyType [in]
-
A DEVPROPTYPE-typed value that represents the property-data-type identifier for the device class property. To delete a property, set this to DEVPROP_TYPE_EMPTY.
- PropertyBuffer [in]
-
Pointer to a buffer that contains the property value of the device class property. If either the property or the data is to be 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]
-
Class property flags:
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_Class_Property is part of the Unified Device Property Model.
Requirements
|
Target platform | |
|---|---|
|
Version |
Available in Microsoft Windows Vista and later versions of Windows. |
|
Header |
|
|
Library |
|
|
Unicode and ANSI names |
CM_Set_Class_PropertyW (Unicode) |
See also