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

# OpenSessionEx

> OpenSessionEx Web Services API メソッドを使用して、FlexiCapture Application Server への接続を確立します。

<div id="what-it-does">
  ## 機能
</div>

Application Server への接続を開きます。このメソッドは、以前のバージョンの Web Services API で利用できた [OpenSession](/ja/flexi-capture/api/methods/open-session) メソッドを置き換えます。

<div id="definition">
  ## 定義
</div>

```csharp theme={null}
int OpenSessionEx(int roleType, int stationType);
```

<div id="parameters">
  ## パラメーター
</div>

| Name          | 型     | Description                                                                                                |
| ------------- | ----- | ---------------------------------------------------------------------------------------------------------- |
| `roleType`    | `int` | 接続に使用するユーザーロールの種類です。使用可能な値については、[RoleType](/ja/flexi-capture/api/structures/t-role-type)を参照してください。         |
| `stationType` | `int` | 接続先ステーションの型です。使用可能な値については、[WorkstationType](/ja/flexi-capture/api/structures/t-workstation-type)を参照してください。 |

<div id="returned-value">
  ## 戻り値
</div>

| 型     | 説明                |
| ----- | ----------------- |
| `int` | 現在開いているコネクションの ID |
