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

Récupère un périphérique en fonction de son identificateur.

## Syntaxe

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

### Paramètres

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

ID du périphérique généré par le système.

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

Périphérique retourné.

### Valeur de retour

Type : HRESULT

Résultat de la fonction.

## Remarques

Une fois obtenue, l'instance de [IGameInputDevice](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) peut être utilisée comme filtre dans les API d'interrogation comme [IGameInput::GetCurrentReading](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md) ou dans les API basées sur les événements comme [IGameInput::RegisterReadingCallback](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md) (pour récupérer les entrées), ou être utilisée directement pour accéder aux informations et fonctionnalités propres au périphérique. Si l'identificateur fourni ne correspond à aucun objet de périphérique GameInput connu, les méthodes GetDeviceFrom\* retournent un pointeur `NULL`. Ces méthodes interrogent l'état local au sein du processus appelant et retournent rapidement ; elles peuvent donc être appelées en toute sécurité depuis des contextes sensibles au temps.

## Configuration requise

**En-tête :** GameInput.h

[Vue d'ensemble de l'API d'entrée](https://docs.xbox.com/fr/build/core-features/common/input/overviews/input-overview.md)\
[IGameInput](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinput/igameinput.md)\
[IGameInputDevice](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInput::GetCurrentReading](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md)\
[IGameInput::RegisterReadingCallback](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md)

## Historique des versions

| Version | Modifications |
| - | - |
| **v0** | Introduite. |


## Related topics

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