CM_Set_Class_Registry_PropertyA function (cfgmgr32.h)

The CM_Set_Class_Registry_Property function sets or deletes a property of a device setup class.

Syntax

CMAPI CONFIGRET CM_Set_Class_Registry_PropertyA(
  [in]           LPGUID   ClassGuid,
  [in]           ULONG    ulProperty,
  [in, optional] PCVOID   Buffer,
  [in]           ULONG    ulLength,
  [in]           ULONG    ulFlags,
  [in, optional] HMACHINE hMachine
);

Parameters

[in] ClassGuid

A pointer to the GUID that represents the device setup class for which to set a property.

[in] ulProperty

A value of type ULONG that identifies the property to set. This value must be one of the CM_CRP_Xxx values that are described for the ulProperty parameter of the CM_Get_Class_Registry_Property function.

[in, optional] Buffer

A pointer to a buffer that contains the property data. This parameter is optional and can be set to NULL. For more information about setting this parameter and the corresponding ulLength parameter, see the following Remarks section.

[in] ulLength

A value of type ULONG that specifies the size, in bytes, of the property data.

[in] ulFlags

Reserved for internal use only. Must be set to zero.

[in, optional] hMachine

A handle to a remote machine on which to set the specified device setup class property. This parameter is optional. If set to NULL, the property is set on the local machine.

Return value

If the operation succeeds, CM_Set_Class_Registry_Property returns CR_SUCCESS. Otherwise, the function returns one of the other CR_Xxx status codes that are defined in Cfgmgr32.h.

Remarks

If Buffer is NULL, ulLength must be set to zero.

If ulLength is set to zero, the function deletes the property.

If Buffer is not set to NULL and ulLength is not set to zero, the supplied value must be the correct size for the REG_Xxx data type for the property that is specified in ulProperty.

Requirements

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

See also

CM_Get_Class_Registry_Property
SetupDiGetClassRegistryProperty
SetupDiSetClassRegistryProperty