Skip to main content
Retrieves information about the force feedback motors on the device, such as their supported axes and effect types.

Syntax

Parameters

infoArrayCount   _In_
Type: uint32_t
Number of elements in infoArray. To retrieve all force feedback motors, pass the value returned by GetForceFeedbackMotorCount. infoArray   _Out_writes_to_opt_(infoArrayCount, return)
Type: GameInputForceFeedbackMotorInfo*
Pointer to an array that receives one structure per force feedback motor. Can be nullptr, in which case nothing is written and the method returns 0.

Return value

Type: uint32_t The number of elements written to infoArray. This is the smaller of infoArrayCount and the number of force feedback motors on the device, or 0 if infoArray is nullptr or the device has no force feedback motors.

Remarks

Each element is a GameInputForceFeedbackMotorInfo structure that describes the axes the corresponding motor drives and the force feedback effect types it supports. Call GetForceFeedbackMotorCount to get the number of force feedback motors, allocate an array of that size, and then call GetForceFeedbackMotorInfo to fill it. If infoArrayCount is smaller than the number of force feedback motors, only the first infoArrayCount elements are written. The force feedback motors of a device don’t change while the device is connected, so you can query them once and cache the result. Element i of the info array describes the motor that has motor index i. Use that index as the motorIndex parameter of CreateForceFeedbackEffect, IsForceFeedbackMotorPoweredOn, and SetForceFeedbackMotorGain. The following example shows how to retrieve the force feedback motors of a device.
In GameInput v3 and earlier, this information was available from the forceFeedbackMotorInfo member of the GameInputDeviceInfo structure returned by IGameInputDevice::GetDeviceInfo.

Requirements

Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

Overview of GameInput
GetForceFeedbackMotorCount
GameInputForceFeedbackMotorInfo
CreateForceFeedbackEffect
IsForceFeedbackMotorPoweredOn
SetForceFeedbackMotorGain
Force feedback on GameInput
IGameInputDevice

Version History

Last modified on November 5, 2026