Windows Application: Raw Input Device Registration - Excluding desired sub-class device
In my Windows application, while registering for 'Raw Input Devices', I wish to register only mouse but the trackpad which is also a pointing device also gets registered.
In MSDN Documentation, Top Level Collection (TLC), says usage of, usUsagePage, usUsage fields of RAWINPUTDEVICE. But there is no information how to exclude one of the devices under the same category. RIDEV_REMOVE, RIDEV_EXCLUDE or any other开发者_JS百科 mode flags doesn't provide the answer and they can only be used for a sub-class depending on usUsagePage value.
Controlling of the particular device of a class is possible once registering and later obtaining 'hDevice' member value of RawInputHeader, but I wish not to register the touchpad in the first place.
Let me know if there is any other option for the above problem.
Thanks in advance
KB
In short, it sounds like the mouse driver in the case of USB, is a HID device, unfortunately, sub-classes of the mouse driver could get registered also as you have found out, have you tried changing the mouse driver to some generic or perhaps disable the trackpad? Perhaps, kill the trackpad program that runs in the tray? But then again you mentioned trackpad which I suspect is the laptop in which you are running the driver off on, have you tried it on a desktop pc with a standalone usb mouse?
Hope this helps, Best regards, Tom.
精彩评论