vb 检测是否突然断网

引用:http://topic.csdn.net/t/20040513/12/3062643.html

Private   Const   FLAG_ICC_FORCE_CONNECTION   =   &H1 
Private   Declare   Function   InternetCheckConnection   Lib   "wininet.dll "   Alias   "InternetCheckConnectionA "   (ByVal   lpszUrl   As   String,   ByVal   dwFlags   As   Long,   ByVal   dwReserved   As   Long)   As   Boolean 

If   InternetCheckConnection( "http://www.csdn.net ",   FLAG_ICC_FORCE_CONNECTION,   0&)   Then
... 
end   if

posted @ 2011-12-08 16:03  镇水古月  阅读(254)  评论(0编辑  收藏  举报