> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInputDevice::GetContainerId

> 入力デバイスのコンテナー ID を取得します。

入力デバイスのコンテナー ID を取得します。

## 構文

```cpp theme={null}
void GetContainerId(
    GUID* containerId
);
```

### パラメーター

*containerId*   \_Out\_\
型: GUID\*

デバイスのコンテナー ID を受け取ります。

### 戻り値

型: void

## 解説

コンテナー ID は、デバイスのプラグ アンド プレイ (PnP) コンテナー ID です。同じ物理デバイスに属するすべてのデバイス ノードは、同じコンテナー ID を共有します。たとえば、ヘッドセット ジャックも備えたコントローラーは、コントローラーとオーディオ デバイスに対して別々のデバイス ノードを公開しますが、どちらも同じコンテナー ID を報告します。コンテナー ID を使用すると、GameInput デバイスを、オーディオ エンドポイントなど他の API を通じて検出した関連デバイスと関連付けることができます。

デバイスにコンテナー ID がない場合、*containerId* は `GUID_NULL` に設定されます。

コンテナー ID は、デバイス オブジェクトの有効期間中は変化しません。

GameInput v3 以前では、この情報は [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md) から返される [GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 構造体の `containerId` メンバーから取得できました。

## 要件

**ヘッダー:** GameInput.h

**ライブラリ:** gameinput.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体、XBOX Series 本体

## 関連項目

[GameInput の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInputDevice::GetDeviceRootId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicerootid.md)\
[IGameInputDevice::GetPnpPath](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getpnppath.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v4** | 導入されました。 |


## Related topics

- [IGameInputDevice::GetDeviceRootId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicerootid.md)
- [IGameInputDevice::GetPnpPath](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getpnppath.md)
- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
- [IGameInputDevice::GetProductId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getproductid.md)
- [IGameInputDevice::GetVendorId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getvendorid.md)
