using System;
using System.Runtime.InteropServices;

namespace MyAssist
{
    /// <summary>
    /// netstat 的摘要说明。
    /// </summary>
    public class netstat
    {
        [DllImport("wininet.dll")]
        private extern static bool InternetGetConnectedState(out int connectionDescription,
            int reservedValue);

        public bool IsConnected()
        {
            int I = 0;
            bool state = InternetGetConnectedState(out I, 0);
            return state;
        }
    }
}

相关文章:

  • 2021-12-25
  • 2021-09-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2021-06-28
  • 2021-07-24
  • 2021-12-16
相关资源
相似解决方案