Desktop Functions: Smart Device Functions:
|
Search Results for "NetworkInformation" in [All]iphlpapiSome, but not, all the information provided by the P/Invoke are available from the managed System.Net.NetworkInformation.NetworkInterface (http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.aspx) class. In .NET 2.0, this library (The IP Helper API) is encapsulated in the NetworkInformation namespace. When you do not need the PID information look at: IPGlobalProperties.GetActiveTcpListeners Method from the System.Net.NetworkInformation namespace 4: GetIfTable System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() Use [System.Net.NetworkInformation.IPGlobalProperties].GetIPGlobalProperties(). wininetTry NetworkInterface.GetIsNetworkAvailable() in the the System.Net.NetworkInformation namespace. It returns true when a network is available and false otherwise. See also: http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.getisnetworkavailable(VS.80).aspx. NOTE: this is all new in .NET 2.0! |