I need to know (preferably with the least latency) when foo.exe
is launched.
Right now, I have a thread that sits in a light loop (~10 Hz) and walks the process tree looking foo.exe
.
This is less than elegant and I was wondering whether I could register with some part of the Windows API to get a callback when any process starts.
If no such facility is available, I am, of course, open to other methods of accomplishing this task more elegantly.