IProvisioningDomain::Query method
Note Wireless Provisioning Services (WPS) is no longer available as of Windows Vista.
The Query method returns a list of XML nodes for a specified WISP domain and language. Wildcards can be used to query all domains or languages.
Syntax
HRESULT Query(
[in] LPCWSTR pszwDomain,
[in] LPCWSTR pszwLanguage,
[in] LPCWSTR pszwXPathQuery,
[out, optional] IXMLDOMNodeList **Nodes
);
Parameters
pszwDomain [in]
Pointer to a string that identifies the domain to query. If this parameter is NULL or points to a string containing "*", all domains will be queried.pszwLanguage [in]
Pointer to a string that identifies a language to query in RFC 1766 format. For example, en or fr can be used to specify English or French language, respectively.If this parameter is points to a string containing "*", all languages will be queried.
If this parameter is NULL, WPS will query using the system-defined settings for the default user interface (UI) language and default user locale. For more information about the algorithm used for this type of query, refer to the remarks below.
pszwXPathQuery [in]
Pointer to a string that contains a fully or partially qualified XPath query. For example, //ssid:ssid should give the same result as /ssid:SSIDs/ssid:ssid.As the example above shows, an element name in an XPath query is specified through the form alias:WPSElementName instead of the fully qualified {WPSSchemaNamespace}WPSElementName form. Other such examples:
/help:Help/help:MHTML
/branding:Branding/branding:FriendlyName
//branding:ServiceDescription
The following table defines the aliases that can be used:
Alias WPS XML schema: ssid SSID schema locations Locations schema help Help schema branding Branding schema register Register schema baseeapconnectionpropertiesv1 BaseEapConnectionPropertiesV1 schema eapconnectionpropertiesv1 EapConnectionPropertiesV1 schema mschapv2connectionpropertiesv1 MsChapV2ConnectionPropertiesV1 schema mspeapconnectionpropertiesv1 MsPeapConnectionPropertiesV1 schema Note XPath queries are case-sensitive. When using aliases for queries, use the alias name exactly as specified in the table.
Nodes [out, optional]
Returned list containing XML document nodes
Return value
If the method succeeds, the return value is S_OK; otherwise, returns one of the following codes:
Return code | Description |
---|---|
E_ACCESSDENIED | The method failed due to a permissions problem. |
E_OUTOFMEMORY | The method was unable to allocate required memory. |
E_POINTER | A pointer passed as a parameter is not valid. |
Remarks
For more information about creating XML queries, see XPath Reference on the MSDN Web site.
If the pszwLanguage parameter is NULL, WPS will query the provisioning store using the system-defined settings for the default user interface (UI) language and default user locale. The algorithm used for this type of query is the following:
Determine the common language between the default UI language and the default user locale.
For example, if the default UI language is en-us and the default user locale is en-ca, then the common language is en. If the default UI language is en-us and the default user locale is fr, there is no common language.
If there is a common language, then query using the default user locale. If there isn't a common language, query using the default UI language.
If the query succeeds, return the results through the Nodes parameter.
If there is a common language, query using the common language.
If the query succeeds, return the results through the Nodes parameter.
If the common language is not English ( en), query using English
If the query succeeds, return the results through the Nodes parameter.
If the query could not find any XML nodes, return NULL for the Nodes parameter.
Requirements
Target platform |
Desktop |
Version |
Not available beginning with Windows Vista. |
Header |
Netprov.h (include Netprov.h) |
See also