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

# DirectInputEscape

> DirectInputEscape

# DirectInputEscape

將硬體特定的命令傳送至力回饋驅動程式。(v3)

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT DirectInputEscape(
    uint32_t command,
    const void* bufferIn,
    size_t bufferInSize,
    void* bufferOut,
    size_t bufferOutSize,
    size_t* bufferOutSizeWritten);
```

### 參數

*command*   \_In\_\
類型：uint32\_t

驅動程式特定的命令編號。如需有效命令的清單，請參閱驅動程式文件。

*bufferIn*   \_In\_reads\_bytes\_(bufferInSize)\
類型：const void\*

包含執行作業所需資料的緩衝區。

*bufferInSize*   \_In\_\
類型：size\_t

`bufferIn` 緩衝區的大小 (以位元組為單位)。

*bufferOut*   \_Out\_writes\_bytes\_(bufferOutSize)\
類型：void\*

包含作業所傳回資料的緩衝區。

*bufferOutSize*   \_In\_\
類型：size\_t

`bufferOut` 緩衝區的大小 (以位元組為單位)。

*bufferOutSizeWritten*   \_Out\_Opt\_\
類型：size\_t\*

寫入 `bufferOut` 緩衝區的大小 (以位元組為單位)。

### 傳回值

類型：HRESULT

函式結果。

<a id="remarksSection" />

## 備註

PC 上的許多力回饋裝置 (最常見的是方向盤) 都以硬體製造商提供的 DirectInput 使用者模式驅動程式為基礎。除了支援力回饋效果等常見功能之外，驅動程式也提供一種進行不透明、類似 IOCTL 之通訊的機制，稱為 Escape。GameInput 不會嘗試剖析或修改遊戲與 DirectInput 之間交換的資料，而是直接傳遞。

<a id="requirementsSection" />

## 需求

**標頭：** GameInput.h

**程式庫：** gameinput.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[GameInput 概觀](/zh-TW/build/core-features/common/input/overviews/input-overview)<br />
[IDirectInputDevice8::Escape](https://learn.microsoft.com/previous-versions/windows/desktop/ee417891\(v=vs.85\))<br />
[IGameInputDevice](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v2** | 已推出。 |


## Related topics

- [IGameInputDevice](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [GameInput](/zh-TW/reference/input/gameinput/gameinput_members.md)
- [GameInput 常見問題集](/zh-TW/build/core-features/common/input/overviews/input-faq.md)
- [IGameInput::FindDeviceFromObject](/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_finddevicefromobject.md)
- [XInputGetState](/zh-TW/reference/input/xinputongameinput/functions/xinputgetstate.md)
