VB检测TCP连接
来源:百度知道 编辑:UC知道 时间:2024/05/18 04:32:41
需要一个VB程序,监测TCP连接,动态刷新IP地址清单(或者5秒刷新一次)。
需要源代码。
需要源代码。
'新建工程,部件-控件 Microsoft windows Common Controls 6.0(SP6)
'在窗体中添加listview1以及Timer1
'Timer1.Interval=500
'窗体中复制如下代码
' 取得 TCP 连接状态表
Option Explicit
Private Type MIB_TCPROW
dwState As Long ' TCP连接状态
dwLocalAddr As Long ' 本机IP
dwLocalPort