XInputGetDeviceId
Retrieves the device ID for the specified 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.
pDeviceId _Out_Type: APP_LOCAL_DEVICE_ID* ID of the device at the specified user index.
Return value
Type: DWORD If the function successfully retrieves the device ID, it returnsERROR_SUCCESS.
If the controller is not connected, the function returns ERROR_DEVICE_NOT_CONNECTED.
If the function fails, it returns a Win32 error code.
Remarks
An application-local device ID uniquely identifies a device, even across restarts of the title or the system. For more information, see Device IDs. For more information about using XInputOnGameInput, see The XInputOnGameInput wrapper.Requirements
Header: XInputOnGameInput.h Library: xgameruntime.lib Supported platforms: XBOX One family consoles and XBOX Series consolesSee also
Porting from XInput to GameInputXInputOnGameInput
