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

# IGameInput::CreateAggregateDevice

> IGameInput::CreateAggregateDevice

# IGameInput::CreateAggregateDevice

指定された [GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md) のすべての入力を集約する仮想 [IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) インスタンスを作成します。

## 構文

```cpp theme={null}
HRESULT CreateAggregateDevice(
         GameInputKind inputKind,
         APP_LOCAL_DEVICE_ID* deviceId
)
```

### パラメーター

*inputKind*   \_In\_\
型: [GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md)

返される仮想 [IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) が読み取り値を集約する入力のタイプ。

*deviceId*   \_Out\_\
型: APP\_LOCAL\_DEVICE\_ID\*

集約デバイスの結果として得られるデバイス識別子。

### 戻り値

型: HRESULT

関数の結果。サポートされていない [GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md) が使用された場合、または [GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md) フラグを組み合わせようとした場合、失敗が返されます。

## 解説

CreateAggregateDevice に使用する入力種別は、[GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md) 列挙型からの単一の値である必要があります。[GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md) フラグの組み合わせはサポートされていません。アプリケーションが複数の入力種別の集約入力を必要とする場合、それぞれに対して仮想 [IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) インスタンスを作成する必要があります。

> [!NOTE]
>
> この関数は、[DisableAggregateDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_disableaggregatedevice.md) を呼び出して無効化された可能性のある集約デバイスを再度有効にするために使用されます。別のインスタンスを作成するのではなく、デバイスが再度有効になります。

集約デバイスは、[RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md) を呼び出して登録されたコールバックを通じてステータス通知も発行します。

集約は次の入力種別に対してのみサポートされます:

* GameInputKindKeyboard
* GameInputKindMouse
* GameInputKindArcadeStick
* GameInputKindFlightStick
* GameInputKindGamepad
* GameInputKindRacingWheel

## 要件

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

[Input API の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[IGameInput](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/igameinput.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v3** | 実装され (以前は v0 で E\_NOTIMPL)、再導入されました。シグネチャが変更: `IGameInputDevice**` が `APP_LOCAL_DEVICE_ID*` に置き換えられました。 |
| **v1** | 削除。 |
| **v0** | 導入されましたが未実装。 |


## Related topics

- [IGameInput::CreateDispatcher](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createdispatcher.md)
- [IGameInput::FindDeviceFromId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md)
- [IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)
- [IGameInput::FindDeviceFromPlatformString](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromplatformstring.md)
- [IGameInput::FindDeviceFromObject (非推奨)](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromobject.md)
