在Windows XP中创建服务并监视我们的应用程序 [英] create service and monitor our application in windows xp
本文介绍了在Windows XP中创建服务并监视我们的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我已经成功创建了一项服务,现在我想要
特定的服务每秒钟监视我的应用程序.如果我的申请已关闭
表示我的服务会自动重新运行该关闭的应用程序.在这里使用C#
Windows应用程序.
在此先感谢
Dhinesh kumar.V
Dear All,
I have successfully create one service and now i wants the
particular service monitor my application every second. If my application is closed
means my service automatically re-run that closed application. Here am using C#
windows application.
Thanks in Advance
Dhinesh kumar.V
推荐答案
这样监视它是一个坏主意,因为这将轮询,即浪费资源,且准确性不高.您始终可以使用推入方法,而不是使用WMI来拉入.
请参阅此CodeProject文章:
使用WMI处理信息和通知 [
Such monitoring it a bad idea, because this would be polling, that is, a waste of resources for little accuracy. You can always use the push approach instead of pull using WMI.
Please see this CodeProject article:
Process Information and Notifications using WMI[^].
—SA
这篇关于在Windows XP中创建服务并监视我们的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文