C#判断检测网络是否连接
2009-09-08 14:34
344 查看
完整的代码: using System.Runtime.InteropServices;
namespace internet
{
public class Class1
{
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( out int connectionDescription, int reservedValue ) ;
public Class1(){}
private bool IsConnected()
{
int I=0;
bool state = InternetGetConnectedState(out I,0);
return state;
}
}
}
namespace internet
{
public class Class1
{
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( out int connectionDescription, int reservedValue ) ;
public Class1(){}
private bool IsConnected()
{
int I=0;
bool state = InternetGetConnectedState(out I,0);
return state;
}
}
}
相关文章推荐
- C#自动更换IE代理IP并判断代理是否可连接网络
- c# 判断网络是否连接
- c# 判断网络是否连接
- C#使用Ping功能判断网络连接状态或者目标计算机是否开机等
- C#判断网络是否连接上
- C# 判断本机是否连接网络
- c# 判断网络是否连接
- c# 判断网络是否连接
- C#检测当前用户网络是否连接
- c# 判断网络是否连接
- C#检测当前用户网络是否连接
- c#通过Windows API 判断网络是否连接
- C#判断系统是否已经连接上网络
- C#判断当前计算机是否已经连接网络
- C#快速检测是否有可用的网络连接存在
- 【C#源码】判断网络是否连接上
- 检测网络是否连接的两种方法(C#)
- c# 判断网络是否连接
- C# 判断系统是否连接网络
- C# 判断连接网络是否正常