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

# IGameInput::CreateAggregateDevice

> IGameInput::CreateAggregateDevice

# IGameInput::CreateAggregateDevice

Creates a virtual [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) instance which aggregates all input of the specified [GameInputKind](/reference/input/gameinput/enums/gameinputkind).

## Syntax

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

### Parameters

*inputKind*   \_In\_\
Type: [GameInputKind](/reference/input/gameinput/enums/gameinputkind)

The type of input which the returned virtual [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) will aggregate readings for.

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

The resulting device identifier for the aggregate device.

### Return value

Type: HRESULT

Function result. Failure returned when an unsupported [GameInputKind](/reference/input/gameinput/enums/gameinputkind) is used or when attempting to combine [GameInputKind](/reference/input/gameinput/enums/gameinputkind) flags.

## Remarks

The input kind used for CreateAggregateDevice must be a single value from the [GameInputKind](/reference/input/gameinput/enums/gameinputkind) enumeration. Combining [GameInputKind](/reference/input/gameinput/enums/gameinputkind) flags is not supported. If an application needs aggregated input for multiple input kinds, it must create a virtual [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) instance for each one.

<Note>This function is used to re-enable an aggregate device that may have been disabled by calling [DisableAggregateDevice](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_disableaggregatedevice). It results in the device re-enabled rather than the creation of another instance.</Note>

The aggregate device will also emit status notification through callback registered by calling [RegisterDeviceCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback).

Aggregation is supported only for the following input kinds:

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

## Requirements

**Header:** GameInput.h

[Input API Overview](/build/core-features/common/input/overviews/input-overview)\
[IGameInput](/reference/input/gameinput/interfaces/igameinput/igameinput)

## Version History

| Version | Changes                                                                                                                                   |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **v3**  | Implemented (previously E\_NOTIMPL in v0) and reintroduced. Signature changed: `IGameInputDevice**` replaced with `APP_LOCAL_DEVICE_ID*`. |
| **v1**  | Removed.                                                                                                                                  |
| **v0**  | Introduced but unimplemented.                                                                                                             |


## Related topics

- [IGameInput::DisableAggregateDevice](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_disableaggregatedevice.md)
- [IGameInputDevice::CreateRawDeviceReport](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md)
- [IGameInput::CreateDispatcher](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createdispatcher.md)
- [IGameInput::FindDeviceFromObject](/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromobject.md)
- [IGameInput::FindDeviceFromId](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md)
