> ## 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::FindDeviceFromObject (已淘汰)

> IGameInput::FindDeviceFromObject

# IGameInput::FindDeviceFromObject

> [!WARNING]
>
> **已淘汰。** 此方法已在 GameInput v1 中移除，目前的 API 中無法使用。

根據相符的平台 COM 物件參考，擷取 [IGameInputDevice](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) 介面。

## 語法

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

### 參數

*value*   \_In\_\
類型：IUnknown\*

要比對的平台 COM 物件 (例如 IDirectInputDevice8 執行個體)。

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

傳回的 [IGameInputDevice](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md) 介面。

### 傳回值

類型：HRESULT

傳回 E\_NOTIMPL，因為此方法在 v0 中從未實作。

## 備註

此方法可讓應用程式從現有的平台物件 (例如 DirectInput 裝置) 擷取 GameInput 裝置介面。此方法已在 v1 中移除。目前可用的替代方法為 [FindDeviceFromId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md) 和 [FindDeviceFromPlatformString](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromplatformstring.md)。

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v1** | 已移除。 |
| **v0** | 推出。 |

## 另請參閱

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


## Related topics

- [IGameInput::FindDeviceFromPlatformHandle (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromplatformhandle.md)
- [IGameInput::EnableOemDeviceSupport (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_enableoemdevicesupport.md)
- [IGameInputDevice::PowerOff (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_poweroff.md)
- [IGameInputDevice::GetRawDeviceFeature (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
- [IGameInputDevice::SetRawDeviceFeature (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
