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

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](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) instance can be used as a filter in the polling APIs like [IGameInput::GetCurrentReading](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md), or event-based APIs like [IGameInput::RegisterReadingCallback](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md) (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](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[IGameInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/igameinput.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInput::GetCurrentReading](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md)\
[IGameInput::RegisterReadingCallback](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md)

## Version History

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


## Related topics

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