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

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

## 構文

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

## 要件

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

[Input API の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[IGameInput](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/igameinput.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInput::GetCurrentReading](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_getcurrentreading.md)\
[IGameInput::RegisterReadingCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerreadingcallback.md)

## バージョン履歴

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


## Related topics

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