WcmQueryProperty function (wcmapi.h)

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

Syntax

DWORD WcmQueryProperty(
  [in, optional] const GUID   *pInterface,
  [in, optional] LPCWSTR      strProfileName,
  [in]           WCM_PROPERTY Property,
                 void         *pReserved,
  [out]          PDWORD       pdwDataSize,
  [out]          PBYTE        *ppData
);

Parameters

[in, optional] pInterface

Type: const GUID*

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

[in, optional] strProfileName

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.

[in] Property

Type: WCM_PROPERTY

The WCM property to query.

pReserved

Type: PVOID

Reserved.

[out] pdwDataSize

Type: PDWORD

The size of the returned property value.

[out] ppData

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 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 Contains zero-length output.

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

WCM_PROPERTY