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

將 I/O 控制碼直接傳送至原始 HID 裝置。

## 語法

```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 成員](/zh-TW/reference/input/gameinput/deprecated/gameinput_deprecated_members)\
[IGameInputDevice::AcquireExclusiveRawDeviceAccess](/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_acquireexclusiverawdeviceaccess)\
[IGameInputDevice](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)


## Related topics

- [IGameInputDevice::ExecuteRawDeviceIoControl](/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_executerawdeviceiocontrol.md)
- [IGameInputDevice::SetRawDeviceFeature](/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [IGameInputDevice::CreateRawDeviceReport](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md)
- [IGameInputDevice::SendRawDeviceOutput](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_sendrawdeviceoutput.md)
