开发者

How can I generate system wide events on Windows?

开发者 https://www.devze.com 2023-01-22 00:59 出处:网络
I would like to know how I can generate system wide events programatically on Windows. I am thinking of generating system wide events such as key presses, touch events and mouse clicks mainly.

I would like to know how I can generate system wide events programatically on Windows. I am thinking of generating system wide events such as key presses, touch events and mouse clicks mainly.

Is it possible to generate these events with an user mode application or I need to write drivers for this? Any samples or links would开发者_JAVA百科 be usefull.


Use SendInput().


(What programming language are you using?) It's possible in regular applications. What you need are "hooks" which are supported by the Win32 API. Here is an article on hooking in C#. Some are using the EasyHook library.

EDIT:

Here is the help on this topic in the Win32 API itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号