WiFiAdapter.FromIdAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
A static method that initiates an asynchronous operation to get a WiFiAdapter object.
Note that if you do not specify that your app has the wiFiControl capability in your app manifest, this method fails.
public:
static IAsyncOperation<WiFiAdapter ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.Overload("FromIdAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<WiFiAdapter> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.Overload("FromIdAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<WiFiAdapter> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of WiFiAdapter)
Parameters
- deviceId
-
String
Platform::String
winrt::hstring
The Device ID of the Wi-Fi adapter to be retrieved. Obtain a Device ID through the Windows.Devices.Enumeration namespace.
Returns
An asynchronous get operation. On successful completion, returns a WiFiAdapter object specific to the requested Device ID.
If you do not specify that your app has the wiFiControl capability in your app manifest, this method fails.
- Attributes
Windows requirements
| Requirements | Description |
|---|---|
| App capabilities |
wiFiControl
|