1

basically my question is if its possible to listen the click event from another app no matter how its programmed and then execute mine (using c#), i made some examples using the spy++ utility with .net, and i know it is possible using the user32.dll and kernel32.dll, libraries that managed this kind of functions

bigmander
  • 133
  • 3
  • 9

3 Answers3

1

You need to write a windows hook, see link1link2 link3

Dmitry Karpezo
  • 1,054
  • 11
  • 26
0

Check out WMI It might help you get there.

Philippe Lavoie
  • 2,583
  • 5
  • 25
  • 39
0

Instead of detect when a click is made to run an application, you must detect when a particular application is launched. you can do this using two ways.

1) using the WMI check the Win32_Process class and the ExecNotificationQuery method.

2) using the PsSetCreateProcessNotifyRoutine function, this function adds a driver-supplied callback routine to, or removes it from, a list of routines to be called whenever a process is created or deleted.

additionally you can check this question How to Recognize that an Application Intends to Execute \ Run a File ?!

Community
  • 1
  • 1
RRUZ
  • 134,889
  • 20
  • 356
  • 483