XInputGetCapabilities
Retrieves the capabilities and features of a connected controller.Syntax
Parameters
dwUserIndex _In_Type: DWORD Index of the gamer associated with the device; a value in the range of 0 to
XUSER_MAX_COUNT - 1.
dwFlags _In_Type: DWORD Input flags that identify the controller type. If this value is 0, the capabilities of all controllers connected to the system are returned. Currently, only
XINPUT_FLAG_GAMEPAD is supported.
pCapabilities _Out_Type: XINPUT_CAPABILITIES* Pointer to an XINPUT_CAPABILITIES object that receives the controller capabilities.
Return value
Type: DWORD If the function succeeds, the return value isERROR_SUCCESS.
If the controller is not connected, the return value is ERROR_DEVICE_NOT_CONNECTED.
If the function fails, the return value is an error code defined in WinError.h. The function does not use SetLastError to set the calling thread’s last-error code.
Remarks
The legacy XINPUT 9.1.0 version (included in Windows Vista and later) always returned a fixed set of capabilities regardless of attached device.
Requirements
Header: XInputOnGameInput.h Library: xgameruntime.lib Supported platforms: XBOX One family consoles and XBOX Series consolesSee also
Porting from XInput to GameInputXInputOnGameInput
