> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IBatchEvents Interface

This is a callback interface that is used for reporting events from the [**Project**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/project.md) and [**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md) objects to the listeners. This interface is implemented on the client side. See the detailed implementation advice for your development tool in [Working with Connectable Objects](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/connectableobjects.md). Below you can find a short summary.

In C++ you need to implement the **IBatchEvents** interface, obtain a connection point, and "advise" object implementing the interface to the **Project** or **Batch** object. As the interface is derived from the **IUnknown** interface, the client object should also implement the **IUnknown** methods.

Visual Basic users that want to receive notifications from one of these objects should declare the event source object of the **BatchEventSource** type *WithEvents*, initialize it with the **Project** or **Batch** object and implement the Sub similar to the following:

```vb theme={null}
Private Sub eventsSource_OnBatchProgress(ByVal Batch As FCEngine.IBatch, _
                                         ByVal ProcessedItemsCount As Integer, _
                                         ByVal RemainingItemsCount As Integer)
...
End Sub
```

An object receiving notifications through this interface methods may do the following inside the methods implementation:

* Process any Windows messages, which is useful in applications having User Interface, to avoid an effect that the application "is not responding" during long recognition operations.
* Report percentage of Document Definitions matching, recognition, and export.
* Report recognizer tips, errors and warnings to the user.
* Report information about processing operation completed.

## Methods

| **Name** | **Description** |
| - | - |
| [**OnBatchProgress**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onbatchprogress.md) | Delivers to the client information about approximate percentage of the current operation (Document Definition matching, recognition, and export). |
| [**OnError**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onerror.md) | Delivers to the client information about the errors which occur during page processing. |
| [**OnPageProgress**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onpageprogress.md) | Delivers to the client information about page processing completed. |
| [**OnPageRectProcessed**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onpagerectprocessed.md) | Delivers to the client information about processed page region. |
| [**OnProcessMessages**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onprocessmessages.md) | Allows the client to terminate the current operation of batch processing. |
| [**OnRecognizerTip**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onrecognizertip.md) | Delivers to the client recognizer tips. |
| [**OnWarning**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ibatchevents-onwarning.md) | Delivers to the client information about the warnings which occur during page processing. |

## See also

[**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md)

[**Project**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/project.md)

[Working with Connectable Objects](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/connectableobjects.md)
