VB2005方法无法处理事件
在该版找到一个和我相似的问题,所以也想找人帮我解答一下。拜托!Private Sub AxPortSIPCoreLib1_InviteTrying(ByVal sender As System.Object, ByVal e As AxPORTSIPCORELIBLib._DPortSIPCoreLibEvents_InviteTryingEvent) Handles AxPortSIPCoreLib1.InviteTrying '如果呼叫方正在呼叫,将触发该事件。
Dim i As Integer = 0
Dim state As Boolean = False
For i = 0 To 4 ‘五条线路
If e.callID = CallSessions(i).GetCallID Then
state = True
Exit For
End If
Next
If state = False Then
Exit Sub
End If
CallSessions(i).SetHoldState(False)
Dim Text As String = "Line " + CStr(i) ’添加日志
Text = Text + ": Calling..."
ListBoxLogs.Items.Add(Text)
End Sub
Private Sub AxPortSIPCoreLib1_InviteTrying(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxPortSIPCoreLib1.RegisterFailure, AxPortSIPCoreLib1.InviteTrying
Logined = False
ListBoxLogs.Items.Add("Logged failed")
End Sub
---------------------------------------------------------------------------------------
方法“Private Sub AxPortSIPCoreLib1_InviteTrying(sender As Object, e As System.EventArgs)”无法处理事件“Public Event InviteTrying(sender As Object, e As AxPORTSIPCORELIBLib._DPortSIPCoreLibEvents_InviteTryingEvent)”,因为它们不具有相同的签名。