Skip to main content

DirectInputEscape

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

Syntax

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
IDirectInputDevice8::Escape
IGameInputDevice

Version History

Last modified on August 31, 2026