> ## 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::FindDeviceFromPlatformHandle（已弃用）

> IGameInput::FindDeviceFromPlatformHandle

# IGameInput::FindDeviceFromPlatformHandle

> [!WARNING]
>
> **已弃用。** 此方法已在 GameInput v1 中移除，当前 API 中不再提供。

基于匹配的平台窗口或文件句柄检索 [IGameInputDevice](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) 接口。

## 语法

```cpp theme={null}
HRESULT FindDeviceFromPlatformHandle(
    HANDLE value,
    IGameInputDevice** device
);
```

### 参数

*value*   \_In\_\
类型：HANDLE

要匹配的平台 HANDLE（例如窗口句柄或设备文件句柄）。

*device*   \_COM\_Outptr\_\
类型：IGameInputDevice\*\*

返回的 [IGameInputDevice](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) 接口。

### 返回值

类型：HRESULT

返回 E\_NOTIMPL，因为此方法在 v0 中从未实现。

## 备注

此方法允许应用程序使用与设备关联的 Win32 句柄查找 GameInput 设备。此方法已在 v1 中移除。请改用 [FindDeviceFromId](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md) 或 [FindDeviceFromPlatformString](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromplatformstring.md)。

## 版本历史

| 版本 | 变更 |
| - | - |
| **v1** | 已移除。 |
| **v0** | 已引入。 |

## 另请参阅

[已弃用的 GameInput API 成员](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[IGameInput::FindDeviceFromId](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md)\
[IGameInput::FindDeviceFromPlatformString](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromplatformstring.md)\
[IGameInput](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/igameinput.md)


## Related topics

- [IGameInput::FindDeviceFromObject（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromobject.md)
- [IGameInput::EnableOemDeviceSupport（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_enableoemdevicesupport.md)
- [IGameInput::FindDeviceFromPlatformString](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromplatformstring.md)
- [已弃用的 GameInput API 成员](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
- [IGameInputDevice::PowerOff（已弃用）](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_poweroff.md)
