WiFiAdapter.ConnectAsync WiFiAdapter.ConnectAsync WiFiAdapter.ConnectAsync WiFiAdapter.ConnectAsync WiFiAdapter.ConnectAsync Method

Definition

Overloads

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind)

Connect this Wi-Fi device to the specified network, with the specified reconnection policy.

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential)

Connect this Wi-Fi device to the specified network, with the specified passphrase and reconnection policy.

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String)

Connect this Wi-Fi device to a hidden network, with the given passphrase and reconnection policy.

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod)

Connect this Wi-Fi device to a hidden network, with the given passphrase, connection method, and reconnection policy.

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind)

Connect this Wi-Fi device to the specified network, with the specified reconnection policy.

public : IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind)
IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind) const;
public IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind)
Public Function ConnectAsync(availableNetwork As WiFiAvailableNetwork, reconnectionKind As WiFiReconnectionKind) As IAsyncOperation(Of WiFiConnectionResult)
Windows.Devices.WiFi.WiFiAdapter.connectAsync(availableNetwork, reconnectionKind).done( /* Your success and error handlers */ );

Parameters

availableNetwork
WiFiAvailableNetwork WiFiAvailableNetwork WiFiAvailableNetwork

Describes the Wi-Fi network to be connected.

reconnectionKind
WiFiReconnectionKind WiFiReconnectionKind WiFiReconnectionKind

Specifies how to reconnect if the connection is lost.

Returns

An asynchronous connect operation. On successful conclusion of the operation, returns an object that describes the result of the connect operation.

See also

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential)

Connect this Wi-Fi device to the specified network, with the specified passphrase and reconnection policy.

public : IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential)
IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential) const;
public IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential)
Public Function ConnectAsync(availableNetwork As WiFiAvailableNetwork, reconnectionKind As WiFiReconnectionKind, passwordCredential As PasswordCredential) As IAsyncOperation(Of WiFiConnectionResult)
Windows.Devices.WiFi.WiFiAdapter.connectAsync(availableNetwork, reconnectionKind, passwordCredential).done( /* Your success and error handlers */ );

Parameters

availableNetwork
WiFiAvailableNetwork WiFiAvailableNetwork WiFiAvailableNetwork

Specifies the Wi-Fi network to connect to.

reconnectionKind
WiFiReconnectionKind WiFiReconnectionKind WiFiReconnectionKind

Describes how to reconnect to the network if connection is lost.

passwordCredential
PasswordCredential PasswordCredential PasswordCredential

The passphrase to be used to connect to the access point.

Returns

An asynchronous connect operation. On successful conclusion of the operation, returns an object that describes the result of the connect operation.

See also

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String)

Connect this Wi-Fi device to a hidden network, with the given passphrase and reconnection policy.

public : IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential, Platform::String ssid)
IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential, winrt::hstring ssid) const;
public IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential, String ssid)
Public Function ConnectAsync(availableNetwork As WiFiAvailableNetwork, reconnectionKind As WiFiReconnectionKind, passwordCredential As PasswordCredential, ssid As String) As IAsyncOperation(Of WiFiConnectionResult)
Windows.Devices.WiFi.WiFiAdapter.connectAsync(availableNetwork, reconnectionKind, passwordCredential, ssid).done( /* Your success and error handlers */ );

Parameters

availableNetwork
WiFiAvailableNetwork WiFiAvailableNetwork WiFiAvailableNetwork

Describes the Wi-Fi network to connect to.

reconnectionKind
WiFiReconnectionKind WiFiReconnectionKind WiFiReconnectionKind

Describes how to reconnect to the network if connection is lost.

passwordCredential
PasswordCredential PasswordCredential PasswordCredential

Password or other credential to use to connect to the network.

ssid
String String String

When the network SSID is hidden, use this parameter to provide the SSID.

Returns

An asynchronous connect operation. On successful conclusion of the operation, returns an object that describes the result of the connect operation.

See also

ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod) ConnectAsync(WiFiAvailableNetwork, WiFiReconnectionKind, PasswordCredential, String, WiFiConnectionMethod)

Connect this Wi-Fi device to a hidden network, with the given passphrase, connection method, and reconnection policy.

public : IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential, Platform::String ssid, WiFiConnectionMethod connectionMethod)
IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential, winrt::hstring ssid, WiFiConnectionMethod connectionMethod) const;
public IAsyncOperation<WiFiConnectionResult> ConnectAsync(WiFiAvailableNetwork availableNetwork, WiFiReconnectionKind reconnectionKind, PasswordCredential passwordCredential, String ssid, WiFiConnectionMethod connectionMethod)
Public Function ConnectAsync(availableNetwork As WiFiAvailableNetwork, reconnectionKind As WiFiReconnectionKind, passwordCredential As PasswordCredential, ssid As String, connectionMethod As WiFiConnectionMethod) As IAsyncOperation(Of WiFiConnectionResult)
Windows.Devices.WiFi.WiFiAdapter.connectAsync(availableNetwork, reconnectionKind, passwordCredential, ssid, connectionMethod).done( /* Your success and error handlers */ );

Parameters

availableNetwork
WiFiAvailableNetwork WiFiAvailableNetwork WiFiAvailableNetwork

Specifies the Wi-Fi network to connect to.

reconnectionKind
WiFiReconnectionKind WiFiReconnectionKind WiFiReconnectionKind

Specifies how to reconnect if the connection is lost.

passwordCredential
PasswordCredential PasswordCredential PasswordCredential

The passphrase to be used to connect to the access point.

ssid
String String String

When the network SSID is hidden, use this parameter to provide the SSID.

connectionMethod
WiFiConnectionMethod WiFiConnectionMethod WiFiConnectionMethod

A WiFiConnectionMethod enumeration member indicating the connection method.

Returns

An asynchronous connect operation. On successful conclusion of the operation, returns an object that describes the result of the connect operation.

Additional features and requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
See also