Syntax
Parameters
bufferByteCount _In_Type: uint32_t The size, in bytes, of the buffer pointed to by buffer. Pass 0 to query the required size. buffer _Out_writes_bytes_opt_(bufferByteCount)
Type: char* The buffer that receives the null-terminated UTF-8 display name. Pass
nullptr to query the required size.
Return value
Type: uint32_t The size, in bytes, of the buffer required to hold the display name, including the null terminator.Remarks
The method writes the display name to buffer only if buffer isn’tnullptr and bufferByteCount is greater than or equal to the required size. Otherwise, the buffer isn’t modified. To retrieve the display name, call the method once with a bufferByteCount of 0 and a buffer of nullptr to get the required size, allocate a buffer of that size, and then call the method again.
If the device doesn’t have a display name, the required size is 1, and the method writes an empty string.
The display name is a “friendly” name for the device. You can display it in your application’s UI, but it isn’t guaranteed to be localized. GameInput searches several locations for this string, and one of the final fallbacks is the device’s firmware.
The display name doesn’t change for the lifetime of the device object.
The following example retrieves the display name of a device.
displayName 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 consolesSee also
Overview of GameInputIGameInputDevice
IGameInputDevice::GetPnpPath
