简体   繁体   English

RtlSetProcessIsCritical 与 NtSetInformationProcess

[英]RtlSetProcessIsCritical vs NtSetInformationProcess

I want to set my process as critical.我想将我的过程设置为关键。 I understand all the risks, just want to know what to call .我明白所有的风险,只是想知道该叫什么

I tried the RtlSetProcessIsCritical method and it worked as it should.我尝试了 RtlSetProcessIsCritical 方法,它正常工作。 Though i tested it on Windows XP virtual machine, one website claimed that RtlSetProcessIsCritical was first presented on Windows 8, and that I need to call NtSetInformationProcess instead.虽然我在 Windows XP 虚拟机上对其进行了测试,但一个网站声称 RtlSetProcessIsCritical 首次出现在 Windows 8 上,我需要调用 NtSetInformationProcess。 So what do I call?那我叫什么Is there really any difference between those two functions?这两个功能之间真的有什么区别吗?

one website claimed that RtlSetProcessIsCritical was first presented on Windows 8一个网站声称 RtlSetProcessIsCritical 首次出现在 Windows 8

That is incorrect.那是不正确的。 It is available in Windows XP and 7, as well.它也适用于 Windows XP 和 7。

However, even to this day, RtlSetProcessIsCritical() is still undocumented by Microsoft.然而,直到今天, RtlSetProcessIsCritical()仍未被 Microsoft记录 Which means, you really should not be using it at all.这意味着,您真的根本不应该使用它。 But, you have already decided to use it, so...但是,你已经决定使用它,所以......

Is there really any difference between those two functions?这两个功能之间真的有什么区别吗?

RtlSetProcessIsCritical simply calls NtSetInformationProcess() internally. RtlSetProcessIsCritical只是在内部调用NtSetInformationProcess() RtlSetProcessIsCritical() is in NTDLL.DLL , whereas NtSetInformationProcess() is in NTOSKRNL (the Windows Kernel), so the former will just call the latter. RtlSetProcessIsCritical()NTDLL.DLL中,而NtSetInformationProcess()NTOSKRNL (Windows 内核)中,因此前者只会调用后者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM