Just as a follow up I just did another test...
This time in the USB firmware I switch the 1st 64 buttons on and the last 64 button off, and then wait 100ms and then do the opposite so that the first 64 buttons are off and the last 64 are on.
The first 120 buttons always show correctly and the last 8 will be random, but the last 8 don't flash and change, they stay static. They are just different each time I start the program.
Looking at the info passed in and out of HidP_GetUsages I think we can rule out the following...
ReportType: I can't see this being the problem and here is the declaration...
Public Enum HIDP_REPORT_TYPE
HidP_Input
HidP_Output
HidP_Feature
End Enum
UsagePage: This must be correct otherwise the first 120 buttons wouldn't work.
LinkCollection: This is not used.
UsageList: I am sure the buffer is correct ,otherwise again, why do the first 120 buttons work?
UsageLength: This is definitely being set to 128 before the call.
PreparsedData: I am sure the data is correct, otherwise the capabilities would be wrong, amongst other things.
By the process of elimination I think we can rule out the the above.
This leaves us Report & ReportLength, which leads me to a part I don't quite understand...
The RAWHID structure from MSDN...
Members
dwSizeHid
Type: DWORD
The size, in bytes, of each HID input in bRawData.
dwCount
Type: DWORD
The number of HID inputs in bRawData.
bRawData
Type: BYTE[1]
The raw input data, as an array of bytes.
Remarks
Each WM_INPUT can indicate several inputs, but all of the inputs come from the same HID. The size of the bRawData array is dwSizeHid * dwCount.
I don't get the purpose of bRawData , even in the c++ code the bRawData is always 1 byte. My dwSizeHid is 65 bytes, and dwCount is 1 so shouldn't bRawData be an array of 65 bytes?
Regards,
Les