Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 检测到ReportAvOnComRelease_C#_Vb.net - Fatal编程技术网

C# 检测到ReportAvOnComRelease

C# 检测到ReportAvOnComRelease,c#,vb.net,C#,Vb.net,很抱歉给您带来不便,我又有一个问题。 我在VB.NET中遇到了一个非常不常见的错误(请参见下面的错误)。 我认为这都是关于COM的问题,但我没有意识到这一点。 这是在我使用winsock_dataArrival函数时发生的。 请给予帮助和尊重,我只是一个.NET初学者。 我还附上下面的图片 检测到ReportAvOnComRelease 代码: 当下面的代码触发时,假设它在模块1中。。 “frmdlg.closeform()” 它调用这个过程。。 代码: 之后,我退出了模块1,现在我在模块2。我

很抱歉给您带来不便,我又有一个问题。 我在VB.NET中遇到了一个非常不常见的错误(请参见下面的错误)。 我认为这都是关于COM的问题,但我没有意识到这一点。 这是在我使用winsock_dataArrival函数时发生的。 请给予帮助和尊重,我只是一个.NET初学者。 我还附上下面的图片

检测到ReportAvOnComRelease

代码:


当下面的代码触发时,假设它在模块1中。。 “frmdlg.closeform()”

它调用这个过程。。 代码:

之后,我退出了模块1,现在我在模块2。我注意到一些代码。 还有“Me.Close”,我想它已经关闭了,但程序会再次调用它。 然后,我把它变成了评论。。
那么,维奥拉!不再发生错误^^

当下面的代码触发时,假设它在模块1中。。 “frmdlg.closeform()”

它调用这个过程。。 代码:

之后,我退出了模块1,现在我在模块2。我注意到一些代码。 还有“Me.Close”,我想它已经关闭了,但程序会再次调用它。 然后,我把它变成了评论。。
那么,维奥拉!不再发生错误^^

使用旧的VB6 Winsock控件是一个错误。使用System.Net命名空间中的类而不是.UP!需要帮助,谢谢管理员。=))使用旧的VB6 Winsock控件是一个错误。使用System.Net命名空间中的类而不是.UP!需要帮助,谢谢管理员。=))
Message: An exception was caught but handled while releasing a COM interface pointer through Marshal.Release or Marshal.ReleaseComObject or implicitly after the corresponding RuntimeCallableWrapper was garbage collected. This is the result of a user refcount error or other problem with a COM object's Release. Make sure refcounts are managed properly.  The COM interface pointer's original vtable pointer was 0x27582bb8. While these types of exceptions are caught by the CLR, they can still lead to corruption and data loss so if possible the issue causing the exception should be addressed
Private Sub Winsock1_DataArrival(ByVal eventSender As System.Object, ByVal eventArgs As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles Winsock1.DataArrival

        Dim strData As String = ""
        Dim msg As String
        Dim i As Integer
        Static bmsg As Boolean

        On Error Resume Next
        peer.GetData(strData)
        peer.RemoteHost = HOST

        If checkMSG(i) Then
            If b_QALoad Then
                dlgQA.setMSG()
            Else
                If MsgBox("You have " & i & " unread message(s)." & vbCrLf & "Do you want to read it now?", MsgBoxStyle.YesNo + MsgBoxStyle.Information, MYPS_ABR) = MsgBoxResult.Yes Then
                    dlgQA.ShowDialog()
                End If
            End If
        End If
    End Sub
Public Sub closeform()
        Me.Close()
    End Sub