WiFiAdapter.RequestAccessAsync Method

Definition

Note

Some information relates to pre-released product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Important

This API will be affected by upcoming changes to operating system behavior, planned for fall 2024. For more info, see Changes to API behavior for Wi-Fi access and location.

A static method for determining whether the current user can access any of the Wi-Fi adapters on this device.

Note that if you do not specify that your app has the wiFiControl capability in your app manifest, this method always returns DeniedBySystem.

Always returns DeniedBySystem on Xbox.

public:
 static IAsyncOperation<WiFiAccessStatus> ^ RequestAccessAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<WiFiAccessStatus> RequestAccessAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<WiFiAccessStatus> RequestAccessAsync();
function requestAccessAsync()
Public Shared Function RequestAccessAsync () As IAsyncOperation(Of WiFiAccessStatus)

Returns

An asynchronous access operation. On successful completion, returns a status enumeration value describing whether the current user can access any Wi-Fi adapter.

Note that if you do not specify that your app has the wiFiControl capability in your app manifest, this method always returns DeniedBySystem.

Always returns DeniedBySystem on Xbox.

Attributes

Applies to