Home > Software engineering >  RtlSetProcessIsCritical vs NtSetInformationProcess
RtlSetProcessIsCritical vs NtSetInformationProcess

Time:01-28

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?

CodePudding user response:

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.

  • Related