NetworkInformation class

1 out of 3 rated this helpful - Rate this topic

Provides access to network connection information for the local machine.

Syntax


var networkInformation = Windows.Networking.Connectivity.NetworkInformation;

Attributes

DualApiPartitionAttribute()
MarshalingBehaviorAttribute(Agile)
StaticAttribute(Windows.Networking.Connectivity.INetworkInformationStatics, NTDDI_WIN8)
VersionAttribute(NTDDI_WIN8)

Members

The NetworkInformation class has these types of members:

Events

The NetworkInformation class has these events.

EventDescription
NetworkStatusChanged Occurs when the network status changes for a connection.

 

Methods

The NetworkInformation class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetConnectionProfiles Gets a list of profiles for connections, active or otherwise, on the local machine.
GetHostNames Gets a list of host names associated with the local machine.
GetInternetConnectionProfile Gets the connection profile associated with the internet connection currently used by the local machine.
GetLanIdentifiers Gets an array of LanIdentifier objects that contain locality information for each NetworkAdapter object that currently connected to a network.
GetProxyConfigurationAsync Gets a proxy configuration for the connection using the specified URI.
GetSortedEndpointPairs Gets a sorted list of EndpointPair objects.

 

Remarks

For examples of how NetworkInformation class methods are implemented, see Quickstart: Retrieving network connection information.

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadata

Windows.winmd

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.