■ RtlSetProcessIsCritical API 함수를 선언하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
using System.Runtime.InteropServices; #region 크리티컬 프로세스 설정하기 - RtlSetProcessIsCritical(newValue, oldValue, needSCB) /// <summary> /// 크리티컬 프로세스 설정하기 /// </summary> /// <param name="newValue">신규 값</param> /// <param name="oldValue">기존 값</param> /// <param name="needSCB">시스템 중요 중단 활성화 여부</param> [DllImport("ntdll", SetLastError = true)] private static extern void RtlSetProcessIsCritical(uint newValue, uint oldValue, uint needSCB); #endregion |