Syntax
Parameters
reportId   _In_Type: uint32_t ID of the feature report to read. Must match the
id member of one of the reports returned by GetFeatureReportInfo.
report   _COM_Outptr_Type: IGameInputRawDeviceReport** Receives a new
IGameInputRawDeviceReport object that contains the feature report data read from the device. Set to nullptr on failure.
Return value
Type: HRESULT ReturnsS_OK on success. Returns E_NOTFOUND if the device doesn’t define a feature report with the specified ID, and GAMEINPUT_E_AGGREGATE_OPERATION_NOT_SUPPORTED if the device is an aggregate device. Returns other error codes if the report can’t be read from the device.
Remarks
TheGetRawDeviceFeature method requests the current contents of a feature report from the device and returns them in a new IGameInputRawDeviceReport object. The kind member of the report’s GameInputRawDeviceReportInfo is GameInputRawFeatureReport, and its data size matches the size member of the corresponding element returned by GetFeatureReportInfo. Read the data by calling GetRawDataSize and IGameInputRawDeviceReport::GetRawData.
Use GetFeatureReportCount and GetFeatureReportInfo to discover which feature reports a device defines. Feature reports are currently exposed for HID devices. For HID devices, the first byte of the report data is the report ID.
Unlike the other raw report methods, GetRawDeviceFeature waits for the device to reply before it returns, so avoid calling it on time-critical threads such as your render or input-polling thread.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputSetRawDeviceFeature
GetFeatureReportCount
GetFeatureReportInfo
IGameInputRawDeviceReport
CreateRawDeviceReport
IGameInputDevice
