IFIX主机增加IP测试
影响
实现图
实现脚本
Option显式私有声明函数GetExitCodeProcess Lib " kernel 32 "(_ ByVal hProcess As Long,_ lpExitCode As Long)私有声明函数close handle Lib " kernel 32 "(_ ByVal hObject As Long)私有声明函数open process Lib " kernel 32 "(_ ByVal dwDesiredAccess As Long,_ ByVal bInheritHandle As Long, _ ByVal dwProcessId As Long)As Long Const PROCESS _ QUERY _ INFORMATION = & h 400 Const STILL _ ALIVE = & h103 private Sub text 2 _ Click()Dim PID As Long PID = Shell(" cmd . exe/C Ping " & " 192 . 168 . 0 . 135 " & " > C:/ipaac . txt ",vbHide)Dim hProc As Long hProc = open PROCESS(PROCESS _ QUERY _ INFORMATION,0,PID)Dim exit code As Long Do Call getexitcode PROCESS(hProc caption = " " Open " c:/ipaac . txt " For Input As # 1 Dim strLine As String Do Until EOF(1)Line Input # 1,strLine Text3。标题=文本3。Caption & strLine & vbNewLine出现错误时循环关闭#1,出现错误时恢复下一个Kill " c:/ipaac . txt " GoTo 0 end Sub
评论前必须登录!
注册