private static extern bool ExitWindowsEx(uint flags, uint reason);
/// <summary> /// Calls the logoff method on the Win32 API. /// </summary> public static void Logoff() { NativeMethods.ExitWindowsEx((uint)NativeMethods.ExitWindows.Logoff, 0x0); }