IPGlobalProperties.EndGetUnicastAddresses Method

Ends a pending asynchronous request to retrieve the stable unicast IP address table on the local computer.

Namespace:  System.Net.NetworkInformation
Assembly:  System (in System.dll)

'Declaration
Public Overridable Function EndGetUnicastAddresses ( _
	asyncResult As IAsyncResult _
) As UnicastIPAddressInformationCollection

Parameters

asyncResult
Type: System.IAsyncResult

An System.IAsyncResult that references the asynchronous request.

Return Value

Type: System.Net.NetworkInformation.UnicastIPAddressInformationCollection
An System.IAsyncResult that stores state information and any user defined data for this asynchronous operation.

ExceptionCondition
NetworkInformationException

The call to the native GetAdaptersAddresses function failed.

NotImplementedException

This method is not implemented on the platform. This method uses the native NotifyStableUnicastIpAddressTable function that is supported on Windows Vista and later.

SecurityException

The caller does not have necessary Read permission.

In order to support outbound connections or to accept incoming connections on a Teredo interface, applications need to ensure that the Teredo interface is up and ready for use. This is because Teredo can go into a dormant state when not used for some period of time.

The BeginGetUnicastAddresses method allows an application to asynchronously retrieve the list of stable unicast IP addresses. The IPAddress.IsIPv6Teredo property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.

The EndGetUnicastAddresses method ends a pending asynchronous request to retrieve the stable unicast IP address table.

The BeginGetUnicastAddresses method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the System.Net.NetworkInformation.NetworkInterface objects on a local computer and querying the associated IP addresses.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft