> ## 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.

# OnProgress Method of the IProcessingEvents Interface

This method is implemented on the client side. It is called by ABBYY FlexiCapture SDK for some of the methods of the [**FieldsExtractionTrainer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldsextractiontrainer.md), [**ClassificationTrainer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/classificationtrainer.md), and [**DataSetTableRecords**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/datasettablerecords.md) objects. It delivers to the client information about approximate readiness of the current operation. Its implementation may show a progress indicator.

> [!WARNING]
>
> For the [IFieldsExtractionTrainer::Train](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldsextractiontrainer-train.md) method, a signal to cancel the operation does not guarantee its interruption.

```vb Visual Basic .NET theme={null}
Sub OnProgress( _
  ProcessedPercent As Integer, _
  ShouldTerminate  As Boolean _
)
```

```cpp C++ theme={null}
HRESULT OnProgress(
  int             ProcessedPercent,
  VARIANT_BOOL*   ShouldTerminate
);
```

## Parameters

**ProcessedPercent**

\[in] For an object implementing the [**IProcessingEvents**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/iprocessingevents.md) interface connected to the [**FieldsExtractionTrainer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldsextractiontrainer.md), this parameter indicates whether the operation is complete or still in progress. If the value of the parameter is -1, the operation is in progress. If the value of the parameter is 100, the operation is complete.\
For an object implementing the [**IProcessingEvents**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/iprocessingevents.md) interface connected to the [**ClassificationTrainer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/classificationtrainer.md), this parameter contains the percent of the work currently done. It is in the range from 0 to 100.

**ShouldTerminate**

\[in] You may set this variable to TRUE to indicate that the process should be terminated. In this case the current processing function returns E\_ABORT.

## Return values

\[C++ only] If this method returns a value other than S\_OK, it indicates that an error occurred on the client side, and in this case the value of the *ShouldTerminate* parameter is not taken into account.

## See also

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

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

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