ABBYY FlexiCapture SDK client application that wants to receive notifications of certain events in ABBYY FlexiCapture SDK, should implement interfaces of specific type, and “advise” objects implementing these interfaces to the corresponding connectable objects. See details for your development tool below.
Visual Basic .NET
Visual Basic .NET
For the Batch object the procedure will be the following:
-
Declare the event source object of the IBatchEvents_Event type WithEvents:
-
Implement the necessary methods of the IBatchEvents interface in the Sub similar to one of the following.
If you want to start and stop event handling at any time during program execution (using AddHandler and RemoveHandler statements):
or simply specify that this procedure handles a particular event (use the Handles keyword when defining):
-
Initialize the event source with the Batch object:
-
Connect the implemented event handler to the event source, use the Batch object for processing, then disconnect the handler:
or simply use the Batch object for processing if you define the event handling methods with Handles keyword:
C++ (COM)
C++ (COM)
In C++ you need to implement necessary interface, obtain a connection point, and “advise” object implementing the interface to the corresponding connectable objects. We will use the Batch object as an example.
-
Implement the IBatchEvents interface. As it is derived from the IUnknown interface, the client object should also implement the IUnknown methods:
-
Then the CProjectEventsListener class may be used to receive notifications from the Batch object. Advise this object to the notifications source (error handling is omitted):
C#
C#
C# procedure is similar to that of Visual Basic. Net. You need to implement necessary methods of the callback interface, initialize the event source with the required object, and connect the implemented event handlers to the event source. We will use the Batch object as an example.
-
Implement the necessary methods of the IBatchEvents interface:
-
Initialize the event source with the Batch object:
-
Connect the event handler to the event source, use the Batch object for processing, then disconnect the handler:
