internal SystemIPGlobalStatistics(AddressFamily family) { uint ipStatistics; this.stats = new MibIpStats(); if (!ComNetOS.IsPostWin2K) { if (family != AddressFamily.InterNetwork) { throw new PlatformNotSupportedException(SR.GetString("WinXPRequired")); } ipStatistics = UnsafeNetInfoNativeMethods.GetIpStatistics(out this.stats); } else { ipStatistics = UnsafeNetInfoNativeMethods.GetIpStatisticsEx(out this.stats, family); } if (ipStatistics != 0) { throw new NetworkInformationException((int) ipStatistics); } }
internal SystemIPGlobalStatistics(AddressFamily family) { uint ipStatistics; this.stats = new MibIpStats(); if (!ComNetOS.IsPostWin2K) { if (family != AddressFamily.InterNetwork) { throw new PlatformNotSupportedException(SR.GetString("WinXPRequired")); } ipStatistics = UnsafeNetInfoNativeMethods.GetIpStatistics(out this.stats); } else { ipStatistics = UnsafeNetInfoNativeMethods.GetIpStatisticsEx(out this.stats, family); } if (ipStatistics != 0) { throw new NetworkInformationException((int)ipStatistics); } }
internal static extern uint GetIpStatisticsEx(out MibIpStats statistics, AddressFamily family);
internal static extern uint GetIpStatistics(out MibIpStats statistics);
internal extern static uint GetIpStatisticsEx(out MibIpStats statistics, AddressFamily family);
private SystemIPGlobalStatistics() { this.stats = new MibIpStats(); }