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

# IProcessingEvents インターフェイスの OnProgress メソッド

このメソッドはクライアント側で実装します。ABBYY FlexiCapture SDK は、[**FieldsExtractionTrainer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fieldsextractiontrainer.md)、[**ClassificationTrainer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/classificationtrainer.md)、および [**DataSetTableRecords**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/datasettablerecords.md) オブジェクトの一部のメソッドの実行中に、このメソッドを呼び出します。このメソッドは、現在の操作のおおよその進捗状況をクライアントに通知します。実装側では、この情報を使って進捗インジケーターを表示できます。

> [!WARNING]
>
> [IFieldsExtractionTrainer::Train](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fieldsextractiontrainer-train.md) メソッドでは、操作のキャンセルを要求しても、操作が中断されるとは限りません。

```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
);
```

## パラメーター

**ProcessedPercent**

\[in] [**FieldsExtractionTrainer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fieldsextractiontrainer.md) に接続された [**IProcessingEvents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/iprocessingevents.md) インターフェイスを実装するオブジェクトの場合、このパラメーターは操作が完了したか、まだ実行中かを示します。パラメーターの値が -1 の場合は操作が実行中であり、100 の場合は操作が完了しています。
[**ClassificationTrainer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/classificationtrainer.md) に接続された [**IProcessingEvents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/iprocessingevents.md) インターフェイスを実装するオブジェクトの場合、このパラメーターには現時点での作業の進捗率 (パーセント) が格納されます。値の範囲は 0～100 です。

**ShouldTerminate**

\[in] プロセスを終了させる場合は、この変数を TRUE に設定できます。この場合、現在の処理関数は E\_ABORT を返します。

## 戻り値

\[C++ のみ] このメソッドが S\_OK 以外の値を返した場合は、クライアント側でエラーが発生したことを示します。その場合、*ShouldTerminate* パラメーターの値は無視されます。

## 関連項目

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

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

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