开发者

get event when a new (external) program is running with API on C#?

开发者 https://www.devze.com 2023-01-29 09:49 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消