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

# GetDevice

> IGameInputReading::GetDevice

# IGameInputReading::GetDevice

Obtém o dispositivo associado a uma IGameInputReading.

## Sintaxe

```cpp theme={null}
void GetDevice(
    IGameInputDevice** device
);
```

### Parâmetros

*device*   \_Outptr\_\
Tipo: IGameInputDevice\*\*

O dispositivo associado à IGameInputReading

### Valor retornado

Tipo: void

## Comentários

Use este método para obter informações sobre o modelo de um dispositivo e seus recursos. Por exemplo, talvez você precise saber o número de botões, matrizes e eixos no dispositivo. Isso será importante quando você precisar passar buffers de tamanho apropriado para as diversas funções Get\*State, como [IGameInputReading::GetGamepadState](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate.md), que exigem um buffer criado pelo desenvolvedor.

## Requisitos

**Cabeçalho:** GameInput.h

[Visão geral da API de entrada](https://docs.xbox.com/pt-BR/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputReading](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)\
[IGameInputReading::GetGamepadState](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate.md)

## Histórico de versões

| Versão | Alterações |
| - | - |
| **v0** | Introduzido. |


## Related topics

- [GetDevice](https://docs.xbox.com/pt-BR/reference/graphics/d3d12/interfaces/id3d12devicechild/methods/id3d12devicechild_getdevice_public.md)
- [IGameInputRawDeviceReport::GetDevice](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_getdevice.md)
- [PartyNetwork::GetDevices](https://docs.xbox.com/pt-BR/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getdevices.md)
- [PartyEndpoint::GetDevice](https://docs.xbox.com/pt-BR/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getdevice.md)
- [PartyChatControl::GetDevice](https://docs.xbox.com/pt-BR/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getdevice.md)
