DragonQ
Member
- Joined
- Nov 2, 2008
- Messages
- 9
- Programming Experience
- Beginner
Hi all,
Originally I was using Process.GetProcesses in a timer that runs every 50ms to check for when a new process of a certain name was started. However, not only does this result in applications that start up quickly displaying for a short time, but also the application takes up to 5% CPU time which is way too high.
So, is it possible to hook onto some event that lets you know when a process has been started or terminated? I found a few code examples on the internet in C# that use "WMI" but they all seem to use what is effectively a timer so this doesn't help with either problem.
Thanks,
DragonQ.
Originally I was using Process.GetProcesses in a timer that runs every 50ms to check for when a new process of a certain name was started. However, not only does this result in applications that start up quickly displaying for a short time, but also the application takes up to 5% CPU time which is way too high.
So, is it possible to hook onto some event that lets you know when a process has been started or terminated? I found a few code examples on the internet in C# that use "WMI" but they all seem to use what is effectively a timer so this doesn't help with either problem.
Thanks,
DragonQ.