ResolveHostNameAsync Method (DnsEndPoint, NetworkInterfaceInfo, NameResolutionCallback, Object)
Collapse the table of content
Expand the table of content

DeviceNetworkInformation.ResolveHostNameAsync Method (DnsEndPoint, NetworkInterfaceInfo, 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 a specified network interface.

Namespace:  Microsoft.Phone.Net.NetworkInformation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

'Declaration
Public Shared Sub ResolveHostNameAsync ( _
	endPoint As DnsEndPoint, _
	networkInterface As NetworkInterfaceInfo, _
	callback As NameResolutionCallback, _
	context As Object _
)

Parameters

endPoint
Type: System.Net.DnsEndPoint
A host name or IP address.
networkInterface
Type: Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceInfo
The network interface on which to resolve the host name.
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.

ExceptionCondition
ArgumentNullException

endPoint, networkInterface, 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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft