get event when a new (external) program is running with API on C#?
i'm wr开发者_开发技巧iting a C# program, and i want to know if there is any way to get notify when a new program is running, without checking every time the task manager and the processes, just like a C# event... or like some hook.. (like SetWindowsHookEx)? thank you! Shiran.
Following article shows you how to use WMI (Windows Management Instrumentation) to do that in C#:
Using WMI to monitor process creation, deletion and modification in .NET
You need ManagementEventWatcher.
精彩评论