WcmSetProperty function

The WcmSetProperty function sets the value of a WCM property.

Syntax


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

Parameters

pInterface [in, optional]

Type: const GUID*

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

strProfileName [in, optional]

Type: LPCWSTR

The profile name.

Property [in]

Type: WCM_PROPERTY

The WCM property to set.

pReserved

Type: PVOID

Reserved.

dwDataSize [in]

Type: DWORD

The size of the new property value.

pbData [in, optional]

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 nameData 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_profileVariable-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]

Header

Wcmapi.h

Library

Wcmapi.lib

DLL

Wcmapi.dll

See also

WCM_PROPERTY
HotSpotProfile schema

 

 

Community Additions

ADD
Show:
© 2014 Microsoft