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

# DirectInputEscape

> DirectInputEscape

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

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

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

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

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

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\

[IDirectInputDevice8::Escape](https://learn.microsoft.com/previous-versions/windows/desktop/ee417891\(v=vs.85\))\

[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Version History

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


## Related topics

- [IGameInputDevice (Interface contents)](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [GameInput API members](https://docs.xbox.com/reference/input/gameinput/gameinput_members.md)
- [GameInput Frequently Asked Questions](https://docs.xbox.com/build/core-features/common/input/overviews/input-faq.md)
- [XInputGetState](https://docs.xbox.com/reference/input/xinputongameinput/functions/xinputgetstate.md)
- [PFDataObjectResult](https://docs.xbox.com/services/playfab/api-references/c/pfdatatypes/structs/pfdataobjectresult.md)
