zoukankan      html  css  js  c++  java
  • c#检测网路连接

    这里网上重复最多的,这里不是检测网络连接,而是网路。也就是你的物理设备连接了。你的网线连接到了交换机网关了。在计算机系统中的网络连接里面,你的本地连接显示已经连接上了。都是显示网路通了。用此方法。

    [DllImport("wininet.dll", EntryPoint = "InternetGetConnectedState")]
            public extern static bool InternetGetConnectedState(out int conState, int reder);
            //参数说明 constate 连接说明 ,reder保留值
            private void button2_Click(object sender, EventArgs e)
            {
                int Desc = 0;
                if (InternetGetConnectedState(out  Desc, 0))
                   label1.Text="已连接在网上!";
                else
                    label1.Text="未连接在网上!!";
            }  

    这里的连接了是指网路不是网络。

  • 相关阅读:
    Bayer RGB和RGB Raw
    YUV像素和ycbcr
    像素,分辨率,PPI(像素密度),BPP 扫盲
    Shadow Register 是什么?
    ITU-R BT.656 协议
    octopress的一些总结
    0ull 是什么意思?
    attribute section的用法
    常见指令集架构
    Centos 用户组管理
  • 原文地址:https://www.cnblogs.com/jinyuttt/p/1805901.html
Copyright © 2011-2022 走看看