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

# IGameInputForceFeedbackEffect::GetDevice

> IGameInputForceFeedbackEffect::GetDevice

# IGameInputForceFeedbackEffect::GetDevice

检索与力反馈效果关联的设备。

## 语法

```cpp theme={null}
void GetDevice(
    IGameInputDevice** device
);
```

### 参数

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

此方法返回与力反馈效果关联的设备。

### 返回值

类型:void

无返回值。

## 注解

`IGameInputForceFeedbackEffect::GetDevice` 方法检索与力反馈效果关联的设备。[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice) 对象表示一个输入设备。`IGameInputDevice` 接口中的方法允许您识别游戏输入设备并与之交互。您可以查询设备信息（例如其类型和能力），也可以激活设备特定的硬件功能，例如触觉反馈和力反馈。有关更多信息，请参见 [Advanced GameInput topics](/build/core-features/common/input/advanced/input-advanced-topics)。

## 要求

**头文件:** GameInput.h

**库:** xgameruntime.lib

**支持的平台:** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参见

[GameInput 概述](/build/core-features/common/input/overviews/input-overview)\
[IGameInputForceFeedbackEffect](/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect)

## 版本历史

| 版本     | 变更  |
| ------ | --- |
| **v0** | 引入。 |


## Related topics

- [IGameInputForceFeedbackEffect::GetGain](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)
- [IGameInputForceFeedbackEffect::SetGain](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setgain.md)
- [IGameInputForceFeedbackEffect::GetParams](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getparams.md)
- [IGameInputForceFeedbackEffect::GetState](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getstate.md)
- [IGameInputForceFeedbackEffect::SetState](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setstate.md)
