WcmSetProperty function

The WcmSetProperty function sets the value of a WCM property.

Syntax

DWORD WcmSetProperty(
  const GUID   *pInterface,
  LPCWSTR      strProfileName,
  WCM_PROPERTY Property,
  PVOID        pReserved,
  DWORD        dwDataSize,
  const BYTE   *pbData
);

Parameters

pInterface

Type: const GUID*

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

strProfileName

Type: LPCWSTR

The profile name.

Property

Type: WCM_PROPERTY

The WCM property to set.

pReserved

Type: PVOID

Reserved.

dwDataSize

Type: DWORD

The size of the new property value.

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

   
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