|
项目描述: |
Here's one way you can tell whether your application has access to the internet. As promising as InternetGetConnectedState sounds, it's far from a reliable solution in making this determination. This sample uses InternetOpenUrl instead to actually try retrieving data from the web. Of course, it relies on "reliable" web sites to do this, so judgment is still involved. Also included are a module that deciphers WinInet error codes and a method to differentiate between modem, proxy, or LAN access.
这里提供一种判断你的应用程序是否连接到Internet的方法。听起来和InternetGetConnectedState 相似,但离可靠地完成这一任务距离还远。这个例子使用了InternetOpenUrl ,而不是真正的从Web上访问数据。当然,这种方法需要停靠可靠的Web站点,所以仍然涉及了判断。也包括了一个模块,解释了WinInet 错误代码,以及一种用于区分调制解调器,代理,或LAN访问的方法。
来源: http://www.mvps.org/vb/ |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
NetConnect |
 1.0  |
2004-04-18 |
下载 |
|
|