To receive all the data processing, how to solve, some people say that Can 't capture COM events in PB, the need to write a wrapper function, don't know whether that is
Do, or there are other ways to solve, who can tell how to solve, under VB call Com components inside the event method is
Dim WithEvents m_oEvent As AltiComLib. ASession
The Set m_oEvent=m_oSession
Private Sub m_oEvent_Event (ByVal EventType As AltiComLib. A_EVENT_TYPE, ByVal EventObj As the Variant)
On Error GoTo errHandler
Dim oLineEvent As AltiComLib. LineEvent
Dim oCallEvent As AltiComLib. CallEvent
Dim oParkEvent As AltiComLib. ParkEvent
Dim oQueueEvent As AltiComLib. QueueEvent
The Select Case EventType
Case A_LINE_STATE_CHANGED
The Set oLineEvent=EventObj
ProcessLineEvent oLineEvent
Case A_CALL_STATE_CHANGED
The Set oCallEvent=EventObj
ProcessCallEvent oCallEvent
Case A_CALL_PARK_EVENT
The Set oParkEvent=EventObj
ProcessParkEvent oParkEvent
Case A_COMMUNICATION_FAIL
Call Disconnect
Case A_QUEUE_EVENT
The Set oQueueEvent=EventObj
If Not (oQueueEvent Is Nothing) Then
ProcessQueue oQueueEvent
End the If
In Case the Else
End the Select
The Set oLineEvent=Nothing
The Set oCallEvent=Nothing
The Set oParkEvent=Nothing
The Set oQueueEvent=Nothing
The Exit Sub
ErrHandler:
RefreshLastErr err
End Sub
I want to make a similar deal with now, just don't use the VB, with PB development, how to implement event function call, thank you, got a lot of day, or didn't progress, who help me!!!!!!!!!!!
CodePudding user response:
No one knows,????? Which eldest brother elder sister to helpCodePudding user response:
PB cannot handle com event, we recommend using VB to do a com encapsulation, PB call VB do com againCodePudding user response:
What do you have QQ, can add, thank you, my QQ is 595428286, PB to call com, VB do not do with PB call VC com effect as well, don't quite understand what meaning, how to encapsulate.CodePudding user response: