HidD_SetOutputReport () failing with error code 31 and 121

Jkr3 1 Reputation point
2021-05-06T08:58:17.677+00:00

Hello Everyone,

I was developing a custom HID application for sending and receiving reports from an HID device. I was able to successfully develop the project and could communicate with the HID device correctly on a Windows 10 PC. But recently, I found that on a PC with windows 10 OS version 16299, the API HidD_SetOutputReport () was failing. The error codes obtained on using GetLastError () was either 31 or 121. I know that 31 refers to GENERAL_FAILURE and 121 refers to semaphore timeout.

Currently, we have tested the application on the following Windows 10 PCs:

  1. 10.0.15063 - The Application passed without any errors.
  2. 10.0.16299 - The Application failed with the API HidD_SetOutputReport () returning false. The error codes obtained was either 31 or 121.
  3. 10.0.19042 - The Application passed without any errors

Currently, we are testing with different OS versions to check if the issue is seen on any other versions.

Please let me know why the API HidD_SetOutputReport () failed on the running Windows 10 version 10.0.16299.

Thanks and Regards

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,968 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.