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

> 取得裝置所屬的輸入裝置系列。

取得裝置所屬的輸入裝置系列。

## 語法

```cpp theme={null}
GameInputDeviceFamily GetDeviceFamily();
```

### 參數

此方法沒有參數。

### 傳回值

類型：[GameInputDeviceFamily](https://docs.xbox.com/zh-TW/reference/input/gameinput/enums/gameinputdevicefamily.md)

輸入裝置的系列，例如 `GameInputFamilyXboxOne`、`GameInputFamilyHid` 或 `GameInputFamilyAggregate`。如果無法判斷系列，則傳回 `GameInputFamilyUnknown`。

## 備註

裝置系列會識別 GameInput 與裝置通訊所透過的驅動程式或通訊協定。它不會描述裝置所提供的輸入類型。若要判斷輸入類型，請使用 [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)。

以 [IGameInput::CreateAggregateDevice](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_createaggregatedevice.md) 建立的彙總裝置會回報 `GameInputFamilyAggregate`。

裝置系列在裝置物件的存留期間內不會變更。

在 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) 結構的 `deviceFamily` 成員取得。

## 需求

**標頭：** 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)\
[GameInputDeviceFamily](https://docs.xbox.com/zh-TW/reference/input/gameinput/enums/gameinputdevicefamily.md)\
[IGameInputDevice::GetSupportedInput](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)

## 版本歷程記錄

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


## Related topics

- [GameInputDeviceFamily](https://docs.xbox.com/zh-TW/reference/input/gameinput/enums/gameinputdevicefamily.md)
- [IGameInputDevice (介面內容)](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
- [IGameInputDevice::GetXInputDeviceIndex](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getxinputdeviceindex.md)
- [IGameInputDevice::GetDeviceRootId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicerootid.md)
