简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM