Share via


WiFiAdapter.ScanAsync Method

Definition

Important

Location consent is now required for Wi-Fi BSSID access. For details on how this affects apps using Wi-Fi or location APIs, see Changes to API behavior for Wi-Fi access and location.

Directs this adapter to initiate an asynchronous network scan.

public:
 virtual IAsyncAction ^ ScanAsync() = ScanAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction ScanAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction ScanAsync();
function scanAsync()
Public Function ScanAsync () As IAsyncAction

Returns

An asynchronous scan operation. On successful completion, returns a list of networks scanned by this adapter.

Attributes

Remarks

You should call this API from a foreground app. If it is called from a background task, you will see an "Access Denied" error message or a similar message.

Applies to