Share via

Why does GetRawInputData always return null as dHandle?

Anonymous
2023-08-12T13:09:41.0933333+00:00

I'm writing an input/output handling middleware in D, and whenever I call GetRawInputData, I always get null for dHandle. No, I don't have a high-precision trackpad, and I also getting it from every input source, be it a keyboard or a mice. I registered the input devices, so I'm getting the input events, but not the device handles, and I cannot find anything in the documentation about any other steps which can be done, and otherwise I'm only getting information about this kind of behavior related to said trackpads, not all input devices.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Limitless Technology 45,241 Reputation points
    2023-08-15T07:35:38.24+00:00

    Hello there,

    Ensure that you are calling the GetRawInputData function correctly. It requires the appropriate parameters to retrieve the data correctly.

    GetRawInputData is a Windows API function that retrieves data from a raw input device. It's commonly used to capture input from devices like keyboards, mice, and other human interface devices (HID). The dHandle parameter in the context of GetRawInputData is a handle to the data that the function retrieves.

    One of the parameters for the GetRawInputData function is the size of the buffer (pData) you're providing to receive the input data. If the buffer size is not set correctly, it could lead to issues like null handles being returned.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    Was this answer helpful?

    0 comments No comments

Your answer

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