I am creating a driver in KMDF that receives input from my device and sends a mouse click command to the operating system. What is the lowest level function I can call to send a mouse click to Windows?
2 Answers
You will not be able to "send mouse click" from KMDF driver, because it's there is no kernel call to do this. The entire HID system works differently that just "sending clicks from mouse driver to user space".
To read about all HID stuff you can go msdn: Introduction to HID Concepts, Handling HID Reports and so on, but there is a lot to get known with.
I don't know your goals, but maybe you could take a look at this project: vmulti, it contains the HID devices emulator, that allows you to send the "virtual" clicks / keys / touches to the driver from user space DLL, and so the virtual HID device will generate the appropriate HID report. Maybe you can use it just like a "black box".
The possible scheme for you is: to send the signal from your kmdf driver to some yours user service, user service have to use the client DLL from vmulti to send desired click to virtual HID device from vmulti, and so you get your click.

- 1,207
- 8
- 17