WcmSetProperty function (wcmapi.h)

The WcmSetProperty function sets the value of a WCM property.

Syntax

DWORD WcmSetProperty(
  [in, optional] const GUID   *pInterface,
  [in, optional] LPCWSTR      strProfileName,
  [in]           WCM_PROPERTY Property,
                 void         *pReserved,
  [in]           DWORD        dwDataSize,
  [in, optional] const BYTE   *pbData
);

Parameters

[in, optional] pInterface

Type: const GUID*

The interface to set. For global properties, this parameter is NULL.

[in, optional] strProfileName

Type: LPCWSTR

The profile name.

[in] Property

Type: WCM_PROPERTY

The WCM property to set.

pReserved

Type: PVOID

Reserved.

[in] dwDataSize

Type: DWORD

The size of the new property value.

[in, optional] pbData

Type: const BYTE*

The new property value.

Return value

Type: DWORD

Returns ERROR_SUCCESS if successful, or an error value otherwise.

Remarks

The type of data stored in the pbData parameter will vary, depending on which property is being set. This table shows the data type of each property.

Property name Data type
wcm_global_property_domain_policy WCM_POLICY_VALUE
wcm_global_property_minimize_policy WCM_POLICY_VALUE
wcm_global_property_roaming_policy WCM_POLICY_VALUE
wcm_global_property_powermanagement_policy WCM_POLICY_VALUE
wcm_intf_property_connection_cost WCM_CONNECTION_COST_DATA
wcm_intf_property_dataplan_status WCM_DATAPLAN_STATUS
wcm_intf_property_hotspot_profile Variable-length XML string. See the HotSpotProfile schema for more information.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header wcmapi.h
Library Wcmapi.lib
DLL Wcmapi.dll

See also

HotSpotProfile schema

WCM_PROPERTY