狠狠色丁香婷婷综合尤物/久久精品综合一区二区三区/中国有色金属学报/国产日韩欧美在线观看 - 国产一区二区三区四区五区tv

LOGO OA教程 ERP教程 模切知識交流 PMS教程 CRM教程 開發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

VB怎么判斷網(wǎng)絡(luò)不通

admin
2014年3月6日 23:38 本文熱度 5659
------解決方案--------------------
方法一:
Const INADDR_NONE As Long = &HFFFFFFFF
Const PING_TIMEOUT As Long = 500
Type icmp_echo_reply
Address As Long
Status As Long
RoundTripTime As Long
DataSize As Long
DataPointer As Long
Data As String * 250
End Type

Declare Function inet_addr Lib "WSOCK32.DLL " (ByVal s As String) As Long
Declare Function IcmpCreateFile Lib "icmp.dll " () As Long
Declare Function IcmpSendEcho Lib "icmp.dll " (ByVal IcmpHandle As Long, _
ByVal DestinationAddress As Long, ByVal RequestData As String, _
ByVal RequestSize As Long, ByVal RequestOptions As Long, _
ReplyBuffer As icmp_echo_reply, ByVal ReplySize As Long, _
ByVal TimeOut As Long) As Long
Declare Function IcmpCloseHandle Lib "icmp.dll " (ByVal IcmpHandle As Long) As Long

Function Ping(ip As String) As Boolean
Dim Echo As icmp_echo_reply
Dim Mystr As String
Dim hPort As Long
Mystr = inet_addr(ip)
If Mystr <> INADDR_NONE Then
hPort = IcmpCreateFile()
If hPort Then
Call IcmpSendEcho(hPort, Mystr, 0, 0, 0, Echo, Len(Echo), PING_TIMEOUT) '發(fā)送回響請求報文
Call IcmpCloseHandle(hPort)
End If
If Echo.Status = 0 Then Ping = True Else Ping = False
End If
End Function

Sub Command1_Click()
If Ping( "172.16.17.175 ") Then MsgBox "ping成功 " Else MsgBox "ping失敗 "
End Sub

該文章在 2014/3/6 23:38:04 編輯過
關(guān)鍵字查詢
相關(guān)文章
正在查詢...
點晴ERP是一款針對中小制造業(yè)的專業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國內(nèi)大量中小企業(yè)的青睞。
點晴PMS碼頭管理系統(tǒng)主要針對港口碼頭集裝箱與散貨日常運作、調(diào)度、堆場、車隊、財務(wù)費用、相關(guān)報表等業(yè)務(wù)管理,結(jié)合碼頭的業(yè)務(wù)特點,圍繞調(diào)度、堆場作業(yè)而開發(fā)的。集技術(shù)的先進(jìn)性、管理的有效性于一體,是物流碼頭及其他港口類企業(yè)的高效ERP管理信息系統(tǒng)。
點晴WMS倉儲管理系統(tǒng)提供了貨物產(chǎn)品管理,銷售管理,采購管理,倉儲管理,倉庫管理,保質(zhì)期管理,貨位管理,庫位管理,生產(chǎn)管理,WMS管理系統(tǒng),標(biāo)簽打印,條形碼,二維碼管理,批號管理軟件。
點晴免費OA是一款軟件和通用服務(wù)都免費,不限功能、不限時間、不限用戶的免費OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved