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

# IGameInputDevice::GetHardwareVersion

> 取得輸入裝置的硬體版本。

取得輸入裝置的硬體版本。

## 語法

```cpp theme={null}
void GetHardwareVersion(
    GameInputVersion* version
);
```

### 參數

*version*   \_Out\_\
類型：[GameInputVersion](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputversion.md)\*

接收裝置的硬體版本。

### 傳回值

類型：void

## 備註

並非所有裝置都會回報硬體版本。如果裝置未回報硬體版本，*version* 的所有成員都會設定為 0。

硬體版本在裝置物件的存留期間內不會變更。

在 GameInput v3 及更早版本中，此資訊可從 [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md) 所傳回 [GameInputDeviceInfo](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 結構的 `hardwareVersion` 成員取得。

## 需求

**標頭：** GameInput.h

**程式庫：** gameinput.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[GameInput 概觀](https://docs.xbox.com/zh-TW/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[GameInputVersion](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputversion.md)\
[IGameInputDevice::GetFirmwareVersion](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfirmwareversion.md)\
[IGameInputDevice::GetRevisionNumber](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrevisionnumber.md)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v4** | 已推出。 |


## Related topics

- [IGameInputDevice::GetFirmwareVersion](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfirmwareversion.md)
- [IGameInputDevice::GetRevisionNumber](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrevisionnumber.md)
- [GameInputVersion](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputversion.md)
- [IGameInputDevice::GetDeviceFamily](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicefamily.md)
- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
