简体   繁体   中英

C# winform identify mouse click by bots

I have a C# winform application.

Is there a way to identify mouse click by bots (automated software). I have to stop mouse clicks by bots using my software.

Found a solution to my problem for windows 8 and above

GetCurrentInputMessageSource function. https://msdn.microsoft.com/en-us/library/windows/desktop/hh448793.aspx

if originId is IMO_INJECTED, the input is emulated. Otherwise, it usually equals IMO_HARDWARE.

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