Syntax
Parameters
infoArrayCount   _In_Type: uint32_t Number of elements in infoArray. To retrieve all output reports, pass the value returned by GetOutputReportCount. infoArray   _Out_writes_to_opt_(infoArrayCount, return)
Type: GameInputRawDeviceReportInfo* Pointer to an array that receives one structure per output report. 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 output reports on the device, or 0 if infoArray isnullptr or the device has no output reports.
Remarks
Each element is a GameInputRawDeviceReportInfo structure whosekind member is GameInputRawOutputReport, whose id member is the device-defined report ID, and whose size member is the size of the report data in bytes.
Call GetOutputReportCount to get the number of output reports, allocate an array of that size, and then call GetOutputReportInfo to fill it. If infoArrayCount is smaller than the number of output reports, only the first infoArrayCount elements are written. The output reports of a device don’t change while the device is connected, so you can query them once and cache the result.
Use the id member of an element as the reportId parameter of CreateRawDeviceReport, together with GameInputRawOutputReport, to create an output report that you can send with SendRawDeviceOutput. The size member gives the number of bytes of report data that the device expects.
The following example shows how to retrieve the output reports of a device.
outputReportInfo 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 GameInputGetOutputReportCount
GameInputRawDeviceReportInfo
GameInputRawDeviceReportKind
IGameInputRawDeviceReport
CreateRawDeviceReport
SendRawDeviceOutput
Advanced GameInput topics
IGameInputDevice
