> ## 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::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](/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) pode ser usada como filtro nas APIs de sondagem, como [IGameInput::GetCurrentReading](/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading), ou nas APIs baseadas em eventos, como [IGameInput::RegisterReadingCallback](/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback) (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](/pt-BR/build/core-features/common/input/overviews/input-overview)\
[IGameInput](/pt-BR/reference/input/gameinput/interfaces/igameinput/igameinput)\
[IGameInputDevice](/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)\
[IGameInput::GetCurrentReading](/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading)\
[IGameInput::RegisterReadingCallback](/pt-BR/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback)

## Histórico de versões

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


## Related topics

- [IGameInput::FindDeviceFromId](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md)
- [IGameInput::FindDeviceFromObject](/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromobject.md)
