Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CM_Set_Class_Registry_Property function

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

Syntax


CMAPI CONFIGRET WINAPI CM_Set_Class_Registry_Property(
  _In_     LPGUID   ClassGuid,
  _In_     ULONG    ulProperty,
  _In_opt_ PVOID    Buffer,
  _In_     ULONG    ulLength,
  _In_     ULONG    ulFlags,
  _In_opt_ HMACHINE hMachine
);

Parameters

ClassGuid [in]

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

ulProperty [in]

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 [in, optional]

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 [in]

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

ulFlags [in]

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

hMachine [in, optional]

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

Target platform

Universal

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Cfgmgr32.h (include Cfgmgr32.h)

Library

Cfgmgr32.lib

Unicode and ANSI names

CM_Set_Class_Registry_PropertyW (Unicode)

See also

CM_Get_Class_Registry_Property
SetupDiGetClassRegistryProperty
SetupDiSetClassRegistryProperty

 

 

Send comments about this topic to Microsoft

Show: