CM_Set_Class_Registry_PropertyW function

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

Syntax

CMAPI CONFIGRET CM_Set_Class_Registry_PropertyW(
  LPGUID   ClassGuid,
  ULONG    ulProperty,
  PCVOID   Buffer,
  ULONG    ulLength,
  ULONG    ulFlags,
  HMACHINE hMachine
);

Parameters

ClassGuid

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

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.

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.

ulLength

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

ulFlags

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

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

   
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