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

Retrieves a device based on its identifier.

## Syntax

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

### Parameters

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

System generated ID for the device.

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

The returned device.

### Return value

Type: HRESULT

Function result.

## Remarks

Once obtained, the [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) instance can be used as a filter in the polling APIs like [IGameInput::GetCurrentReading](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading), or event-based APIs like [IGameInput::RegisterReadingCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback) (to retrieve input), or used directly to access device-specific information and features. If the provided identifier cannot be matched with any known GameInput device objects, the GetDeviceFrom\* methods return a `NULL` pointer. These methods interrogate local state within the calling process and return quickly, so they are safe to call from time sensitive contexts.

## Requirements

**Header:** GameInput.h

[Input API Overview](/build/core-features/common/input/overviews/input-overview)\
[IGameInput](/reference/input/gameinput/interfaces/igameinput/igameinput)\
[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)\
[IGameInput::GetCurrentReading](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading)\
[IGameInput::RegisterReadingCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback)

## Version History

| Version | Changes     |
| ------- | ----------- |
| **v0**  | Introduced. |


## Related topics

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