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

# GetWorkProcessId Method of the IWorkProcessControl Interface

Returns the ID of the process which hosts FlexiCapture SDK. The program which uses FlexiCapture SDK can control whether the host process is alive and can terminate the process if necessary.

> [!NOTE]
>
> It is important to obtain the identifier of the process first, and only then start the work with FlexiCapture SDK. This is due to the fact that all FlexiCapture SDK method calls are performed sequentially, therefore, when FlexiCapture SDK is not responding, the call to this method will remain in the queue and will not finish too.

## Syntax

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

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

## Parameters

**Result**

\[out, retval] This parameter contains the identifier of the host process.

## Return values

This method has no specific return values. It returns the [standard return values of the ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

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

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

[Different Ways to Load the Engine Object](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/differentwaystoloadengine.md)

[See sample](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md): FlexiCapture SDK Code Snippets
