如何在执行时捕获进程? [英] how to catch a process when executing?

查看:81
本文介绍了如何在执行时捕获进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个应用程序,它将识别一个特定的进程。假设当vlc媒体播放器执行时,我们可以看到它在taskmaster进程选项卡上的进程。所以我想创建一个将初始化的应用程序,当时系统启动,它会在系统启动时继续运行。如果发现vlc.exe进程正在执行,它会执行一段时间,然后自动显示一条消息/或我想要触发的事件。



#注意: - 我知道这个社区不适合我们的家庭作业。我只想知道一些方法的逻辑,或者你可以用一些代码/一些算法来指导我。就是这样。

解决方案

这样做的方法是基本上获取正在运行的进程列表并查找所需的进程。显然你会在计时器上这样做。



http://www.howtogeek.com/howto/programming/get-a-list-of-running-processes-in-c/ [< a href =http://www.howtogeek.com/howto/programming/get-a-list-of-running-processes-in-c/target =_ blanktitle =New Window> ^

I want to make a application which will,identify a particular process.Suppose when vlc media player executes, then we can see it''s process at taskmaster process tab.So i want to make a application which will initialize,when system start,and it will run continue as system will on.On it''s execution period if it found that vlc.exe process executing then automatically show a message/or what event i want to fire.

#Note:- I know this community is not for our homework.I just want to know logic of some approach or u can guide me with some code/some algo.That''s it.

解决方案

the way to do this is to basically get the list of running processes and look for the one you want. Clearly you''d do this on a timer.

http://www.howtogeek.com/howto/programming/get-a-list-of-running-processes-in-c/[^]


这篇关于如何在执行时捕获进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆