DeviceNetworkInformation.ResolveHostNameAsync Method (DnsEndPoint, NameResolutionCallback, Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Asynchronously resolves a host name on the first available network interface.
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
'Declaration Public Shared Sub ResolveHostNameAsync ( _ endPoint As DnsEndPoint, _ callback As NameResolutionCallback, _ context As Object _ )
Parameters
- endPoint
- Type: System.Net.DnsEndPoint
A host name or IP address.
- callback
- Type: Microsoft.Phone.Net.NetworkInformation.NameResolutionCallback
A delegate that references the method to invoke when the operation is complete.
- context
- Type: System.Object
A user-defined object that contains information about the operation.
| Exception | Condition |
|---|---|
| ArgumentNullException | endPoint or callback is Nothing. |
The context object is passed to the NameResolutionCallback delegate and then stored in the NameResolutionResult class when the operation is complete. If the application calling this method transitions to a dormant state before the callback is fired, a NetworkErrorCode with a value of NameResolutionOperationAborted will be received in the callback.