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

> IGameInput::FindDeviceFromId

# IGameInput::FindDeviceFromId

Recupera um dispositivo com base no identificador dele.

## Sintaxe

```cpp theme={null}
HRESULT FindDeviceFromId(
    const APP_LOCAL_DEVICE_ID* value,
    IGameInputDevice** device
);
```

### Parâmetros

*value*   \_In\_\
Tipo: APP\_LOCAL\_DEVICE\_ID\*

ID gerada pelo sistema para o dispositivo.

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

O dispositivo retornado.

### Valor retornado

Tipo: HRESULT

Resultado da função.

## Comentários

Depois de obtida, a instância de [IGameInputDevice](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) pode ser usada como filtro nas APIs de sondagem, como [IGameInput::GetCurrentReading](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md), ou nas APIs baseadas em eventos, como [IGameInput::RegisterReadingCallback](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md) (para recuperar a entrada), ou ser usada diretamente para acessar informações e recursos específicos do dispositivo. Se o identificador fornecido não puder ser correspondido a nenhum objeto de dispositivo conhecido do GameInput, os métodos GetDeviceFrom\* retornarão um ponteiro `NULL`. Esses métodos consultam o estado local dentro do processo de chamada e retornam rapidamente, portanto, é seguro chamá-los de contextos sensíveis ao tempo.

## 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)\
[IGameInput](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/igameinput.md)\
[IGameInputDevice](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInput::GetCurrentReading](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md)\
[IGameInput::RegisterReadingCallback](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md)

## Histórico de versões

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


## Related topics

- [IGameInput::FindDeviceFromObject (Preterido)](https://docs.xbox.com/pt-BR/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromobject.md)
- [IGameInput::FindDeviceFromPlatformHandle (Preterido)](https://docs.xbox.com/pt-BR/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromplatformhandle.md)
- [APP_LOCAL_DEVICE_ID](https://docs.xbox.com/pt-BR/reference/system/xuser/structs/app_local_device_id.md)
- [IGameInput::FindDeviceFromPlatformString](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromplatformstring.md)
- [IGameInput::CreateAggregateDevice](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createaggregatedevice.md)
