Skip to main content
Some of the objects in ABBYY FlexiCapture SDK are so-called “connectable objects”. This means that they implement the IConnectionPointContainer interface. Connectable objects support communication between ABBYY FlexiCapture SDK and its clients. Each of the ABBYY FlexiCapture SDK connectable objects provides connection points of two types – one that uses a dispatch interface, and one that uses interface derived from IUnknown. The dispatch interface is designed for automatic use in Visual Basic and similar environments, while the vtbl-based interface is suitable for use in C++. In the table below you can find the list of connectable objects in ABBYY FlexiCapture SDK and corresponding callback interfaces (dispinterfaces): 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.
For the Batch object the procedure will be the following:
  1. Declare the event source object of the IBatchEvents_Event type WithEvents:
  2. 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):
  3. Initialize the event source with the Batch object:
  4. 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:
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.
  1. Implement the IBatchEvents interface. As it is derived from the IUnknown interface, the client object should also implement the IUnknown methods:
  2. 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# 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.
  1. Implement the necessary methods of the IBatchEvents interface:
  2. Initialize the event source with the Batch object:
  3. Connect the event handler to the event source, use the Batch object for processing, then disconnect the handler:
Refer to documentation on COM for a more detailed description of connectable objects.

See also

IBatchEvents ICollectionEvents IProcessingEvents