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

識別子に基づいてデバイスを取得します。

## 構文

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

### パラメーター

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

デバイス用にシステムが生成した ID。

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

返されるデバイス。

### 戻り値

型: HRESULT

関数の結果。

## 解説

取得された [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) インスタンスは、[IGameInput::GetCurrentReading](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading) のようなポーリング API や [IGameInput::RegisterReadingCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback) のようなイベント ベース API (入力を取得するため) でフィルターとして使用したり、デバイス固有の情報と機能にアクセスするために直接使用することができます。指定された識別子が既知の GameInput デバイス オブジェクトのいずれとも一致しない場合、GetDeviceFrom\* メソッドは `NULL` ポインターを返します。これらのメソッドは呼び出し元プロセス内のローカル状態を照会して迅速に返るため、時間に敏感なコンテキストからでも安全に呼び出すことができます。

## 要件

**ヘッダー:** GameInput.h

[Input API の概要](/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)

## バージョン履歴

| バージョン  | 変更内容     |
| ------ | -------- |
| **v0** | 導入されました。 |


## Related topics

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