今天学C#,尝试写点东西,哈哈~
我是API控!

using System;
using System.Runtime.InteropServices;

namespace Dangerous
{
    static class Program
    {
        [DllImport("NTDLL")]
        private static extern void RtlAdjustPrivilege(int Privilege, int NewValue, int NewThread, out int OldValue);

        [DllImport("NTDLL")]
        private static extern void NtShutdownSystem(int Action);

        [STAThread]
        static void Main()
        {
            int i;
            RtlAdjustPrivilege(19, 1, 0, out i);
            NtShutdownSystem(1);
        }
    }
}

功能不解释 ^_^

标签: RtlAdjustPrivilege(), Win32, C#, NtShutdownSystem()