> ## 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::GetDeviceRootId

> 入力デバイスのルート デバイス ノードのアプリケーション ローカル ID を取得します。

入力デバイスのルート デバイス ノードのアプリケーション ローカル ID を取得します。

## 構文

```cpp theme={null}
void GetDeviceRootId(
    APP_LOCAL_DEVICE_ID* deviceRootId
);
```

### パラメーター

*deviceRootId*   \_Out\_\
型: [APP\_LOCAL\_DEVICE\_ID](https://docs.xbox.com/ja-jp/reference/system/xuser/structs/app_local_device_id.md)\*

ルート デバイス ノードのアプリケーション ローカル ID を受け取ります。

### 戻り値

型: void

## 解説

ルート デバイス ID は、複合デバイスのルート デバイス ノードを識別するアプリケーション ローカル ID です。これにより、アプリケーションは個々のデバイス間の関係を判断できます。たとえば、一部のゲーミング キーボードは、複数のキーボード ノードを持つ複合デバイスとして自身を公開することで、同時に 8 つのキーストロークという従来の USB の制限を回避しています。これらのノードは "システム" キーボードに統合されるため、通常ユーザーがこれを意識することはありません。しかし、GameInput API を使用してキーボードごとの入力を処理する場合、この関係を理解しておくと、アプリケーションが機能をキーストロークにマッピングする際に不適切な想定 (たとえば、キーストロークは常に特定のデバイスから送られてくるという想定) を避けるのに役立ちます。

同じルート デバイス ID を報告するデバイスは、同じ複合デバイスに属しています。デバイスが複合デバイス上の複数のインターフェイスの 1 つでない場合、ルート デバイス ID は [IGameInputDevice::GetDeviceId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md) から返される 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) 構造体の `deviceRootId` メンバーから取得できました。

## 要件

**ヘッダー:** 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::GetDeviceId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)\
[IGameInputDevice::GetContainerId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontainerid.md)\
[APP\_LOCAL\_DEVICE\_ID](https://docs.xbox.com/ja-jp/reference/system/xuser/structs/app_local_device_id.md)

## バージョン履歴

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


## Related topics

- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
- [IGameInputDevice::GetContainerId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontainerid.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)
- [IGameInputDevice (インターフェイスの内容)](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
