当前位置: 网学 > 编程文档 > VB > 正文

使用VB截获WIN98系列下的IP数据包

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
ent = CreateEvent(0, 1, 0, vbNullString)
        If (hEvent = 0) Then
            MsgBox "ERROR CREATEEVENT"
            RecvPacket = SYSERR
            Exit Function
        End If
        RecvTab(K).hEvent = hEvent
        ''memset(RecvTab[k].Buffer,0,BUFFER_SIZE);
        RecvTab(K).Size = BUFFER_SIZE
        RecvTab(K).Active = True
        RecvTab(K).Type = nREAD
        EventTab(RECV_MAX - 1) = hEvent
        Call RecvStart(hVxD, RecvTab(K))
        RecvPacket = len1
        Exit Function
    Else
        RecvPacket = SYSERR
    End If
End Function


Function RecvStart(ByVal hVxD As Long, packtab As PacketTable) As Long
    Dim result As Long
    packtab.Overlap.Internal = 0
    packtab.Overlap.InternalHigh = 0
    packtab.Overlap.offset = 0
    packtab.Overlap.OffsetHigh = 0
    packtab.Overlap.hEvent = packtab.hEvent

    result = DeviceIoControl(hVxD, _
                           IOCTL_PROTOCOL_READ, _
                           packtab.Buffer(0), _
                           packtab.Size, _
                           packtab.Buffer(0), _
                           packtab.Size, _
                           packtab.Length, _
                           packtab.Overlap)

    If (result <> 0)
  • 上一篇资讯: 如何映射/中断网络磁盘
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号