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
55 public UInt32 dwLength;
\r
56 public UInt32 dwMemoryLoad;
\r
57 public UInt32 dwTotalPhys; // Used
\r
58 public UInt32 dwAvailPhys;
\r
59 public UInt32 dwTotalPageFile;
\r
60 public UInt32 dwAvailPageFile;
\r
61 public UInt32 dwTotalVirtual;
\r
62 public UInt32 dwAvailVirtual;
\r
66 /// Global Memory Status
\r
68 /// <param name="lpBuffer">
\r
71 [DllImport("kernel32.dll")]
\r
72 public static extern void GlobalMemoryStatus
\r
74 ref MEMORYSTATUS lpBuffer
\r
77 [DllImport("kernel32.dll", SetLastError = true)]
\r
78 public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId);
\r
81 /// Console Ctrl Event
\r
83 public enum ConsoleCtrlEvent
\r