IClientEvents Interface (COM-based API)
This is a callback interface that is used for reporting events from the Client object to the listeners. This interface is implemented on the client side. As it derives from the IUnknown interface, the client object should also implement the IUnknown methods. This interface is designed primarily for use in C++. Visual Basic users that wish to receive notifications from the Client object should declare it WithEvents and implement the following Subs:
Public WithEvents cl As ABBYYFinereaderServer.Client
Private Sub cl_OnJobComplete(ByVal jobId As String,
ByVal result As XmlResult)
...
End Sub
Note. You cannot call the ProcessFile, ProcessFileAsync, ProcessXmlTicket, and ProcessXmlTicketAsync methods in the event handler.
Methods
Name | Description |
OnJobComplete | Provides information about job completion to the client. |
Remarks
To receive notifications correctly, please make sure that your application releases control and runs the Windows message loop. See the sample below.
Visual Basic 6.0
Dim WithEvents Client As ABBYYFineReaderServer.Client
Dim Workflow As String
Dim Filename As String
Private Sub StartListening_Click()
' The StartListening method is called and then control is released
Client.StartListening Workflow, True
End Sub
Private Sub ProcessAsync_Click()
' The ProcessFileAsync method is called and then control is released
Client.ProcessFileAsync Workflow, Filename
End Sub
Private Sub client_OnJobComplete(ByVal jobId As String, ByVal result As XmlResult)
' Here is a reaction to job completion
End Sub
See also
3/26/2024 1:49:49 PM