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

Sends a hardware-specific command to the force-feedback driver. (v3)

<a id="syntaxSection" />

## Syntax

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

### Parameters

*command*   \_In\_\
Type: uint32\_t

Driver-specific command number. Consult the driver documentation for a list of valid commands.

*bufferIn*   \_In\_reads\_bytes\_(bufferInSize)\
Type: const void\*

Buffer containing the data required to perform the operation.

*bufferInSize*   \_In\_\
Type: size\_t

Size, in bytes, of the `bufferIn` buffer.

*bufferOut*   \_Out\_writes\_bytes\_(bufferOutSize)\
Type: void\*

Buffer containing the data returned from the operation.

*bufferOutSize*   \_In\_\
Type: size\_t

Size, in bytes, of the `bufferOut` buffer.

*bufferOutSizeWritten*   \_Out\_Opt\_\
Type: size\_t\*

Size, in bytes, written to the `bufferOut` buffer.

### Return value

Type: HRESULT

Function result.

<a id="remarksSection" />

## Remarks

Many force feedback devices on PC (most commonly steering wheels) are based on a DirectInput user-mode driver, which is provided by the hardware manufacturer. In addition to supporting common features like force feedback effects, the driver also provides a mechanism for doing opaque IOCTL-like communication, called Escape. GameInput makes no attempt to parse or modify the data being exchanged between the game and DirectInput, it is a straight pass-through.

<a id="requirementsSection" />

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[Overview of GameInput](/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](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## Version History

| Version | Changes     |
| ------- | ----------- |
| **v2**  | Introduced. |


## Related topics

- [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [GameInput](/reference/input/gameinput/gameinput_members.md)
- [GameInput frequently asked questions](/build/core-features/common/input/overviews/input-faq.md)
- [PFDataObjectResult](/services/playfab/api-references/c/pfdatatypes/structs/pfdataobjectresult.md)
- [XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate.md)
