2 using System.Runtime.InteropServices;
\r
4 namespace Handbrake.Functions
\r
8 [DllImport("user32.dll")]
\r
9 public static extern bool SetForegroundWindow(int hWnd);
\r
11 [DllImport("user32.dll")]
\r
12 public static extern void LockWorkStation();
\r
14 [DllImport("user32.dll")]
\r
15 public static extern int ExitWindowsEx(int uFlags, int dwReason);
\r
17 public struct MEMORYSTATUS // Unused var's are required here.
\r
19 public UInt32 dwLength;
\r
20 public UInt32 dwMemoryLoad;
\r
21 public UInt32 dwTotalPhys; // Used
\r
22 public UInt32 dwAvailPhys;
\r
23 public UInt32 dwTotalPageFile;
\r
24 public UInt32 dwAvailPageFile;
\r
25 public UInt32 dwTotalVirtual;
\r
26 public UInt32 dwAvailVirtual;
\r
29 [DllImport("kernel32.dll")]
\r
30 public static extern void GlobalMemoryStatus
\r
32 ref MEMORYSTATUS lpBuffer
\r
35 [DllImport("kernel32.dll", SetLastError = true)]
\r
36 public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId);
\r
38 public enum ConsoleCtrlEvent
\r