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)

Syntax

Public Shared Sub ResolveHostNameAsync ( _
    endPoint As DnsEndPoint, _
    networkInterface As NetworkInterfaceInfo, _
    callback As NameResolutionCallback, _
    context As Object _
)
public static void ResolveHostNameAsync(
    DnsEndPoint endPoint,
    NetworkInterfaceInfo networkInterface,
    NameResolutionCallback callback,
    Object context
)

Parameters

  • context
    Type: System..::.Object
    A user-defined object that contains information about the operation.

Exceptions

Exception Condition
ArgumentNullException

endPoint, networkInterface, or callback is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

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.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

DeviceNetworkInformation Class

ResolveHostNameAsync Overload

Microsoft.Phone.Net.NetworkInformation Namespace