2 This file is part of the HandBrake source code.
\r
3 Homepage: <http://handbrake.fr>.
\r
4 It may be used under the terms of the GNU General Public License. */
\r
7 namespace Handbrake.Functions
\r
10 using System.Runtime.InteropServices;
\r
18 /// Set the Forground Window
\r
20 /// <param name="hWnd">
\r
24 /// A Boolean true when complete.
\r
26 [DllImport("user32.dll")]
\r
27 public static extern bool SetForegroundWindow(int hWnd);
\r
30 /// Lock the workstation
\r
32 [DllImport("user32.dll")]
\r
33 public static extern void LockWorkStation();
\r
38 /// <param name="uFlags">
\r
41 /// <param name="dwReason">
\r
47 [DllImport("user32.dll")]
\r
48 public static extern int ExitWindowsEx(int uFlags, int dwReason);
\r
51 /// System Memory Status
\r
53 public struct MEMORYSTATUS // Unused var's are required here.
\r
58 public UInt32 dwLength;
\r
63 public UInt32 dwMemoryLoad;
\r
67 public UInt32 dwTotalPhys; // Used
\r
70 /// Available Physical Memory
\r
72 public UInt32 dwAvailPhys;
\r
77 public UInt32 dwTotalPageFile;
\r
80 /// Available Page File
\r
82 public UInt32 dwAvailPageFile;
\r
85 /// Total Virtual Memory
\r
87 public UInt32 dwTotalVirtual;
\r
90 /// Available Virtual Memory
\r
92 public UInt32 dwAvailVirtual;
\r
96 /// Global Memory Status
\r
98 /// <param name="lpBuffer">
\r
101 [DllImport("kernel32.dll")]
\r
102 public static extern void GlobalMemoryStatus
\r
104 ref MEMORYSTATUS lpBuffer
\r
107 [DllImport("kernel32.dll", SetLastError = true)]
\r
108 public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId);
\r
111 /// Console Ctrl Event
\r
113 public enum ConsoleCtrlEvent
\r