Skip to main content
Gets the application-local ID that uniquely identifies the input device.

Syntax

Parameters

deviceId   _Out_
Type: APP_LOCAL_DEVICE_ID*
Receives the application-local ID of the device.

Return value

Type: void

Remarks

The device ID is an application-local ID: a 256-bit hash value that uniquely identifies the device. This ID stays the same for a given device, even across runs of an application or reboots of the system, as long as the device connects to the same USB port. The hash is generated partly from information that’s specific to the calling application and system, so the same device has different IDs in different applications. Because the ID is stable, you can store it to remember a device, such as a user’s preferred controller, and later look up the matching device object by calling IGameInput::FindDeviceFromId. For devices that are one of several interfaces on a composite device, use IGameInputDevice::GetDeviceRootId to get the ID of the root device. If the device isn’t part of a composite device, the device ID and the root device ID are the same. In GameInput v3 and earlier, this information was available from the deviceId 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
IGameInputDevice
IGameInputDevice::GetDeviceRootId
IGameInput::FindDeviceFromId
APP_LOCAL_DEVICE_ID

Version History

Last modified on November 5, 2026