设置关机时处理的优先级 [英] Setting priority to process while shutdown

查看:133
本文介绍了设置关机时处理的优先级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Working in C#
I have three processes Process-A, Process-B and Process-C running in my system startup.

在系统启动时,Process-A将首先启动,然后Process-B,然后是Process-C

At the time of system start up, Process-A will start first and then Process-B and then process-C


当我发出关机信号时,通过系统关机选项,

推荐答案

在本机代码中,您可以尝试使用系统Windows会话结束时的挂钩.还请看一下关于此线程的想法:
http://social.msdn.microsoft.com/forums/zh-CN/vcgeneral/thread/06c0ecd5- c749-446a-bf71-c0054a757e96/

在C#中当然可以设置系统挂钩,但这非常复杂,因为您需要使用P/Invoke.在这里,您有一些链接:
http://www.codeproject.com/KB/cs/netwin32hooks.aspx

问候,
帕维尔
In native code you can try using system hooks for end of windows session. Also take a look at the idea on this thread:
http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/06c0ecd5-c749-446a-bf71-c0054a757e96/

In C# it's of course possible to set a system hook but it's quite complicated because you'll need to use P/Invoke. Here you have some links:
http://support.microsoft.com/kb/318804
http://www.codeproject.com/KB/cs/netwin32hooks.aspx

Regards,
Pawel


这篇关于设置关机时处理的优先级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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