Physician
Physician

Reputation: 483

Can you get Windows raw input data immediately without WM_INPUT messages?

So can I get input data of a given device without the need to receive a WM_INPUT message altogether? Is there a function in Windows API that allows me to ask about the last input reading of a given device without involving a WNDPROC for message processing, and ideally without a window, and without device registration?

In an ideal scenario, I'd just look for the list connected devices, and ask for the input reading of the device I need.

Upvotes: 1

Views: 712

Answers (1)

DJm00n
DJm00n

Reputation: 1421

You can use (possibly overlapped - for async reads) ReadFile on a HID device file handle. See Obtaining HID Reports article and HClient sample application that is doing both - enumerating devices and reads from them. It is doing that without WM_INPUT/Raw Input API.

Upvotes: 1

Related Questions