| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3281 人关注过本帖
标题:VB实时错误429
只看楼主 加入收藏
leziyi
Rank: 1
等 级:新手上路
帖 子:52
专家分:0
注 册:2016-10-30
结帖率:85.71%
收藏
已结贴  问题点数:20 回复次数:5 
VB实时错误429
程序代码:
Private Form_Load()
Dim Str()                       As String
    Dim X                           As Integer
    
    Set frmAlert = New Thread---------------------------------------此行出错
    Set pThread = New Thread
    'If FormAlert.IsThreadRunning = False Then FormAlert.CreateWin32Thread Me, "ShowBarForm", 0
    'If pThread.IsThreadRunning = False Then pThread.CreateWin32Thread Me, "ShowThreadForm", 0

    Set ProtocolBuilder = New clsProtocolInterface
    Set TCPDriver = New clsTCPProtocol
    Set UDPDriver = New clsUDPProtocol
    Set g_aProgramDescriptions = New Dictionary
    Set g_DBCon = MakeADOConnection
    Set g_rsTrojan = New ADODB.Recordset
    Set g_rsPorts = New ADODB.Recordset
    Proc_Startup
    ProtocolBuilder.AddinProtocol TCPDriver, "TCP", IPPROTO_TCP
    ProtocolBuilder.AddinProtocol UDPDriver, "UDP", IPPROTO_UDP
    
    Str = Split(EnumNetworkInterfaces(), ";")
    For X = 0 To UBound(Str)
        If Str(X) <> "127.0.0.1" Then
            cmbInterface.AddItem Str(X) & " [" & GetHostNameByAddr(inet_addr(Str(X))) & "]"
        End If
    Next
    If cmbInterface.ListCount > 0 Then cmbInterface.ListIndex = 0
    
    Set HelpObj = New clsHelpCallBack
    Call ModCoolMenu.Install(Me.hwnd, HelpObj)
    ModCoolMenu.ForeColor (Me.hwnd)
    Call ModCoolMenu.FullSelect(Me.hwnd, True)
    
    txtIP.ToolTipText = txtIP.ToolTipText & " (提示: * wildcard 不支持)"
    
    LoadSettings
    LoadPrograms
    
    Pic16.Width = (SMALL_ICON) * Screen.TwipsPerPixelX 'Set the Temp Picture Box properties.
    Pic16.Height = (SMALL_ICON) * Screen.TwipsPerPixelY 'Set the Temp Picture Box properties.
    Pic32.Width = LARGE_ICON * Screen.TwipsPerPixelX 'Set the Temp Picture Box properties.
    Pic32.Height = LARGE_ICON * Screen.TwipsPerPixelY 'Set the Temp Picture Box properties.
    g_sShell32Path = FixPath(SpecialFolder(WinSystem)) & "shell32.dll" 'Get the shell32.dll location into memory for later use.
    IP_Initialize
    With lstTCPConnections
        If g_bXPTable = True Then .ColumnHeaders.Add , , "映像名称", 2500
        .ColumnHeaders.Add , , "本地地址", 2500
        .ColumnHeaders.Add , , "本地端口", 1100
        .ColumnHeaders.Add , , "远程地址", 2500
        .ColumnHeaders.Add , , "远程端口", 1300
        .ColumnHeaders.Add , , "状态", 1000
        If g_bXPTable = True Then
            .ColumnHeaders.Add , , "使用", 1000
            .ColumnHeaders.Add , , "进程 ID", 1200
        End If
        .ZOrder
    End With
    With lstUDPConnections
        If g_bXPTable = True Then .ColumnHeaders.Add , , "映像名称", 2500
        .ColumnHeaders.Add , , "本地地址", 2500
        .ColumnHeaders.Add , , "本地端口", 1100
        If g_bXPTable = True Then
            .ColumnHeaders.Add , , "使用", 1000
            .ColumnHeaders.Add , , "进程 ID", 1200
        End If
    End With
    With lstPrograms
        .Icons = ilTray
        .SmallIcons = ilTray
        .ColumnHeaders.Add , , "激活", 700
        .ColumnHeaders.Add , , "映像名称", 3500
        .ColumnHeaders.Add , , "存取", 800
        .ColumnHeaders.Add , , "服务", 800
    End With
    With lstPorts
        .ColumnHeaders.Add , , "端口", 850
        .ColumnHeaders.Add , , "方向", 1300
    End With
    With lstIPs
        .ColumnHeaders.Add , , "IP/主机", 1700
        .ColumnHeaders.Add , , "方向"
    End With
    With lstPacket
        .SmallIcons = ilPacket
        .ColumnHeaders.Add , , "来源", 2500
        .ColumnHeaders.Add , , "目标", 2500
        .ColumnHeaders.Add , , "时间", 1200
        .ColumnHeaders.Add , , "版本", 800
        .ColumnHeaders.Add , , "数据", 2500
    End With
    MakeNumberOnly txtPort
    LoadPorts
    LoadIPs
    Form_Resize
    
    With nidProgramData
        .cbSize = Len(nidProgramData)
        .hwnd = FrmMenu.hwnd
        .uId = vbNull
        .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
        .uCallbackMessage = WM_MOUSEMOVE
        .hIcon = FrmMain.ilTray.ListImages(10).ExtractIcon
        .szTip = "Fire Gate" & vbNullChar
    End With
    Shell_NotifyIcon NIM_ADD, nidProgramData
    
    FrmThread.tmrThread.Enabled = True
    FrmThread.Visible = False
End Sub
搜索更多相关主题的帖子: Set If Add End With 
2018-11-10 21:44
ZHRXJR
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:125
帖 子:1034
专家分:5519
注 册:2016-5-10
收藏
得分:5 
VB实时错误429错误是 Active 部件不能创建对象。
既然是 Set frmAlert = New Thread 产生错误,那么估计是你的 Thread 部件没有注册或没有引用。
检查 Thread 部件是否在【部件】列表中或在【引用】列表中。

请不要选我!!!
2018-11-11 07:58
leziyi
Rank: 1
等 级:新手上路
帖 子:52
专家分:0
注 册:2016-10-30
收藏
得分:0 
引用后又变成错误:实型不匹配
2018-11-11 08:24
ZHRXJR
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:125
帖 子:1034
专家分:5519
注 册:2016-5-10
收藏
得分:5 
不知道哪里出错了,但
    Set ProtocolBuilder = New clsProtocolInterface
    Set TCPDriver = New clsTCPProtocol
    Set UDPDriver = New clsUDPProtocol
    Set g_aProgramDescriptions = New Dictionary
这些均牵扯到上面所说的问题,是否注册或引用?
看来你的这个程序是从哪里下载的吧,如果下载的不是工程文件而仅仅是代码,出错的几率非常大,而且调试比较困难。

请不要选我!!!
2018-11-11 11:34
leziyi
Rank: 1
等 级:新手上路
帖 子:52
专家分:0
注 册:2016-10-30
收藏
得分:0 
是工程文件
2018-11-11 15:13
ZHRXJR
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:125
帖 子:1034
专家分:5519
注 册:2016-5-10
收藏
得分:10 
如果是工程文件,应该不会有问题,除非这个工程文件本身就存在问题,是没有调试成功的工程文件。

请不要选我!!!
2018-11-11 22:27
快速回复:VB实时错误429
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015946 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved