3 This file is part of the HandBrake source code.
\r
4 Homepage: <http://handbrake.fr>.
\r
5 It may be used under the terms of the GNU General Public License. */
\r
9 using System.Runtime.InteropServices;
\r
11 namespace Handbrake.Functions
\r
15 [DllImport("user32.dll")]
\r
16 public static extern bool SetForegroundWindow(int hWnd);
\r
18 [DllImport("user32.dll")]
\r
19 public static extern void LockWorkStation();
\r
21 [DllImport("user32.dll")]
\r
22 public static extern int ExitWindowsEx(int uFlags, int dwReason);
\r
24 public struct MEMORYSTATUS // Unused var's are required here.
\r
26 public UInt32 dwLength;
\r
27 public UInt32 dwMemoryLoad;
\r
28 public UInt32 dwTotalPhys; // Used
\r
29 public UInt32 dwAvailPhys;
\r
30 public UInt32 dwTotalPageFile;
\r
31 public UInt32 dwAvailPageFile;
\r
32 public UInt32 dwTotalVirtual;
\r
33 public UInt32 dwAvailVirtual;
\r
36 [DllImport("kernel32.dll")]
\r
37 public static extern void GlobalMemoryStatus
\r
39 ref MEMORYSTATUS lpBuffer
\r
42 [DllImport("kernel32.dll", SetLastError = true)]
\r
43 public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId);
\r
45 public enum ConsoleCtrlEvent
\r