Skip to content

Latest commit

 

History

History
188 lines (136 loc) · 6.58 KB

nf-wlanapi-wlanhostednetworkquerystatus.md

File metadata and controls

188 lines (136 loc) · 6.58 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wlanapi.WlanHostedNetworkQueryStatus
WlanHostedNetworkQueryStatus function (wlanapi.h)
Queries the current status of the wireless Hosted Network.
WlanHostedNetworkQueryStatus
WlanHostedNetworkQueryStatus function [NativeWIFI]
nwifi.wlanhostednetworkquerystatus
wlanapi/WlanHostedNetworkQueryStatus
nwifi\wlanhostednetworkquerystatus.htm
nwifi
896cff65-74ec-41d5-89e3-95fa85fd54cd
12/05/2018
WlanHostedNetworkQueryStatus, WlanHostedNetworkQueryStatus function [NativeWIFI], nwifi.wlanhostednetworkquerystatus, wlanapi/WlanHostedNetworkQueryStatus
wlanapi.h
Wlanapi.h
Windows
Windows 7 [desktop apps only]
Windows Server 2008 R2 [desktop apps only]
Wlanapi.lib
Wlanapi.dll
Windows
19H1
WlanHostedNetworkQueryStatus
wlanapi/WlanHostedNetworkQueryStatus
c++
APIRef
kbSyntax
DllExport
Wlanapi.dll
WlanHostedNetworkQueryStatus

WlanHostedNetworkQueryStatus function

-description

The WlanHostedNetworkQueryStatus function queries the current status of the wireless Hosted Network.

-parameters

-param hClientHandle [in]

The client's session handle, returned by a previous call to the WlanOpenHandle function.

-param ppWlanHostedNetworkStatus [out]

On input, this parameter must be NULL.

On output, this parameter receives a pointer to the current status of the wireless Hosted Network, if the call to the WlanHostedNetworkQueryStatus function succeeds. The current status is returned in a WLAN_HOSTED_NETWORK_STATUS structure.

-param pvReserved

Reserved for future use. This parameter must be NULL.

-returns

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value may be one of the following return codes.

Return code Description
ERROR_INVALID_HANDLE
A handle is invalid. This error is returned if the handle specified in the hClientHandle parameter was not found in the handle table.
ERROR_INVALID_PARAMETER
A parameter is incorrect. This error is returned if any of the following conditions occur:
  • hClientHandle is NULL.
  • ppWlanHostedNetworkStatus is NULL.
  • pvReserved is not NULL.
ERROR_INVALID_STATE
The resource is not in the correct state to perform the requested operation. This can occur if the wireless Hosted Network was in the process of shutting down.
ERROR_SERVICE_NOT_ACTIVE
The service has not been started. This error is returned if the WLAN AutoConfig Service is not running.
Other
Various RPC and other error codes. Use FormatMessage to obtain the message string for the returned error.

-remarks

The WlanHostedNetworkQueryStatus function is an extension to native wireless APIs added to support the wireless Hosted Network on Windows 7 and on Windows Server 2008 R2 with the Wireless LAN Service installed.

A client application calls the WlanHostedNetworkQueryStatus function to query the current status of the wireless Hosted Network. This function does not change the state of the wireless Hosted Network.

If the function succeeds, the ppWlanHostedNetworkStatus parameter points to a WLAN_HOSTED_NETWORK_STATUS structure with the current status. The memory used for the WLAN_HOSTED_NETWORK_STATUS structure that is returned should be freed after use by calling the WlanFreeMemory function.

Any user can call the WlanHostedNetworkQueryStatus function to query the Hosted Network. However, the ability to enable the wireless Hosted Network may be restricted by group policy in a domain.

On Windows 7 and later, the operating system installs a virtual device if a Hosted Network capable wireless adapter is present on the machine. This virtual device normally shows up in the “Network Connections Folder” as ‘Wireless Network Connection 2’ with a Device Name of ‘Microsoft Virtual WiFi Miniport adapter’ if the computer has a single wireless network adapter. This virtual device is used exclusively for performing software access point (SoftAP) connections and is not present in the list returned by the WlanEnumInterfaces function. The lifetime of this virtual device is tied to the physical wireless adapter. If the physical wireless adapter is disabled, this virtual device will be removed as well. This feature is also available on Windows Server 2008 R2 with the Wireless LAN Service installed.

-see-also

About the Wireless Hosted Network

Using Wireless Hosted Network and Internet Connection Sharing

WLAN_HOSTED_NETWORK_STATUS

WlanEnumInterfaces

WlanFreeMemory

WlanHostedNetworkQueryProperty

WlanHostedNetworkQuerySecondaryKey

WlanOpenHandle