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

# GetDeviceInfo (非推奨)

> 入力デバイスのすべてのプロパティと機能に関する静的情報にアクセスします (v4 で削除)。

> [!WARNING]
>
> **非推奨。** このメソッドは GameInput v4 で削除され、現在の API では利用できません。代わりに、[GetVendorId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getvendorid.md) や [GetRacingWheelInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getracingwheelinfo.md) など、[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) の個別の getter メソッドを使用してください。[GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) の各メンバーと代替メソッドの対応については、そのページの「解説」セクションを参照してください。

入力デバイスのすべてのプロパティと機能に関する静的情報にアクセスします。

## 構文

```cpp theme={null}
HRESULT GetDeviceInfo(
    const GameInputDeviceInfo** info
);
```

### パラメーター

*info*   \_Outptr\_\
型: GameInputDeviceInfo\*\*

IGameInputDevice に関連付けられたデバイス情報。

### 戻り値

型: HRESULT

関数の結果。

## 解説

`GetDeviceInfo` メソッドのメモリはアプリケーションが所有するものではありません。アプリケーションが `IGameInput` インスタンスを保持している限り、メモリには引き続きアクセスできます。`IGameInput` オブジェクトへの参照が解放されると、メモリは解放されます。

次のコード例は、レーシング ホイールにクラッチがあるかどうかを判定する方法を示しています。

```cpp theme={null}
bool HasClutch(IGameInputDevice* wheel) noexcept
{
    const GameInputDeviceInfo* wheelInfo = nullptr;
    const bool succeeded = SUCCEEDED(wheel->GetDeviceInfo(&wheelInfo));
    assert(succeeded);
    assert(wheelInfo->racingWheelInfo);

    const bool hasClutch = wheelInfo->racingWheelInfo->hasClutch;

    return hasClutch;
}
```

## 要件

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

## 関連項目

[非推奨の GameInput API メンバー](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[GameInput の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v4** | 削除されました。 |
| **v3** | シグネチャに変更はありません。[GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) が拡張されました: `controllerInfo` が追加され (個別の軸/ボタン/スイッチの数と情報のフィールド、および `uiNavigationInfo` を置き換え)、`inputReportCount`/`inputReportInfo` と `outputReportCount`/`outputReportInfo` が追加され、`hapticFeedbackMotorInfo` が削除されました。 |
| **v2** | シグネチャに変更はありません。[GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) に `revisionNumber`、`hardwareVersion`、`firmwareVersion`、`containerId`、`sensorsInfo` が追加されました。 |
| **v1** | シグネチャに変更はありません。[GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) が大幅に簡素化されました: `infoSize`、`interfaceNumber`、`collectionNumber`、`capabilities`、およびタッチ/ハプティクス/文字列/記述子のフィールドが削除され、`supportedSystemButtons`、`displayName`、`pnpPath` が追加されました。 |
| **v0** | 導入されました。 |


## Related topics

- [GameInputDeviceInfo (非推奨)](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md)
- [GetDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md)
- [GetDeviceStatus (非推奨)](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdevicestatus.md)
- [IGameInputDevice::GetRawDeviceFeature (非推奨)](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
- [IGameInputDevice::GetBatteryState (非推奨)](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getbatterystate.md)
