Have you tried using breakpoints and examining what you are passing to the API calls and what they are returning? Sometimes that can offer a clue. For example, is the report data returned by ReadFile what you expect? If so, work forward from there to find a parameter that is suspicious.
I have debugged this until I am blue in the face.
If I move the HidP_GetCaps in the code above to after the part that's giving me an error it still works, so surely that means the PreparsedData is OK.
I added SetLastError:=True to the 2 functions and get the following errors...
HidP_MaxDataListLength failed with Error: 87
HidP_GetData failed with Error: 1008
I don't know how that helps me though.
Lastly if I add
capsLength =HidP_MaxDataListLength(HidP_Input,pPreparsedData);
to the vc++ code linked in the first post, it works as expected with the same USB device which makes me think there is not a problem with the descriptor.
Regards,
Les