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

# IGameInputDevice::ExecuteRawDeviceIoControl

> IGameInputDevice::ExecuteRawDeviceIoControl

# IGameInputDevice::ExecuteRawDeviceIoControl

<Warning>**已弃用。** 此方法已在 GameInput v1 中移除，当前 API 中不再提供。</Warning>

直接向原始 HID 设备发送 I/O 控制代码。

## 语法

```cpp theme={null}
HRESULT ExecuteRawDeviceIoControl(
    uint32_t controlCode,
    size_t inputBufferSize,
    const void* inputBuffer,
    size_t outputBufferSize,
    void* outputBuffer,
    size_t* outputSizeWritten
);
```

### 参数

*controlCode*   \_In\_\
类型：uint32\_t

要发送的 I/O 控制代码。

*inputBufferSize*   \_In\_\
类型：size\_t

`inputBuffer` 的大小（以字节为单位）。

*inputBuffer*   \_In\_reads\_bytes\_opt\_(inputBufferSize)\_\
类型：const void\*

指向输入数据缓冲区的指针。

*outputBufferSize*   \_In\_\
类型：size\_t

`outputBuffer` 的大小（以字节为单位）。

*outputBuffer*   \_Out\_writes\_bytes\_opt\_(outputBufferSize)\_\
类型：void\*

指向输出数据缓冲区的指针。

*outputSizeWritten*   \_Out\_opt\_\
类型：size\_t\*

已写入 `outputBuffer` 的字节数。

### 返回值

类型：HRESULT

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

## 备注

当通过 `AcquireExclusiveRawDeviceAccess` 获取了原始设备的独占访问权限时可以使用此方法。作为原始设备访问模型简化的一部分，此方法已在 v1 中移除。

## 版本历史

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

## 另请参阅

[已弃用的 GameInput API 成员](/reference/input/gameinput/deprecated/gameinput_deprecated_members)\
[IGameInputDevice::AcquireExclusiveRawDeviceAccess](/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_acquireexclusiverawdeviceaccess)\
[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)


## Related topics

- [IGameInputDevice::SetRawDeviceFeature](/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [IGameInputDevice::GetRawDeviceFeature](/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
- [IGameInputDevice::AcquireExclusiveRawDeviceAccess](/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_acquireexclusiverawdeviceaccess.md)
- [IGameInputDevice::ReleaseExclusiveRawDeviceAccess](/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_releaseexclusiverawdeviceaccess.md)
- [已弃用的 GameInput API 成员](/zh-CN/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
