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

# IWorkProcessControl インターフェイスの GetWorkProcessId メソッド

FlexiCapture SDK をホストしているプロセスの ID を返します。FlexiCapture SDK を使用するプログラムは、ホストプロセスが動作しているかどうかを監視し、必要に応じてそのプロセスを終了できます。

> [!NOTE]
>
> FlexiCapture SDK での作業を開始する前に、必ずプロセスの識別子を取得してください。FlexiCapture SDK のメソッド呼び出しはすべて順次実行されるため、FlexiCapture SDK が応答しなくなると、このメソッドの呼び出しもキューに残ったまま完了しなくなります。

## 構文

```vb Visual Basic .NET theme={null}
Function GetWorkProcessId() As Integer
```

```cpp C++ theme={null}
HRESULT GetWorkProcessId(
  int* Result
);
```

## パラメーター

**Result**

\[out, retval] このパラメーターには、ホストプロセスの識別子が格納されます。

## 戻り値

このメソッドに固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## 関連項目

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

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

[Engine オブジェクトのさまざまな読み込み方法](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/differentwaystoloadengine.md)

[サンプルを参照](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md)：FlexiCapture SDK Code Snippets
