[DllImport("ntdll.dll", SetLastError=false)]
static extern uint RtlSetProcessIsCritical(bool bNew, IntPtr expectsZero, bool bNeedsScb);
None.
None.
The expectsZero parameter is actually something to read the old value.
Please add some!
Process.EnterDebugMode();
RtlSetProcessIsCritical(1, 0, 1);