简体   繁体   中英

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. 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. 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

That is incorrect. It is available in Windows XP and 7, as well.

However, even to this day, RtlSetProcessIsCritical() is still undocumented by 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() is in NTDLL.DLL , whereas NtSetInformationProcess() is in NTOSKRNL (the Windows Kernel), so the former will just call the latter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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