WcmQueryProperty function

The WcmQueryProperty function retrieves the value of a specified WCM property.

Syntax


DWORD WINAPI WcmQueryProperty(
  _In_opt_    const GUID *pInterface,
  _In_opt_    LPCWSTR strProfileName,
  _In_        WCM_PROPERTY Property,
  _Reserved_  PVOID pReserved,
  _Out_       PDWORD pdwDataSize,
  _Out_       PBYTE *ppData
);

Parameters

pInterface [in, optional]

Type: const GUID*

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

strProfileName [in, optional]

Type: LPCWSTR

The name of the profile. If querying a non-global property (connection_cost, dataplan_status, or hotspot_profile), the profile must be specified or the call will fail.

Property [in]

Type: WCM_PROPERTY

The WCM property to query.

pReserved

Type: PVOID

Reserved.

pdwDataSize [out]

Type: PDWORD

The size of the returned property value.

ppData [out]

Type: PBYTE*

The returned property value.

Return value

Type: DWORD

Returns ERROR_SUCCESS if successful, or an error value otherwise.

Remarks

The type of data stored in the ppData parameter will vary, depending on which property is being queried. 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_profileContains zero-length output.

 

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft