summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/Win32.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Functions/Win32.cs')
-rw-r--r--win/C#/Functions/Win32.cs27
1 files changed, 26 insertions, 1 deletions
diff --git a/win/C#/Functions/Win32.cs b/win/C#/Functions/Win32.cs
index 2d067b40e..2bc47e619 100644
--- a/win/C#/Functions/Win32.cs
+++ b/win/C#/Functions/Win32.cs
@@ -1,4 +1,5 @@
-using System.Runtime.InteropServices;
+using System;
+using System.Runtime.InteropServices;
namespace Handbrake.Functions
{
@@ -6,5 +7,29 @@ namespace Handbrake.Functions
{
[DllImport("user32.dll")]
public static extern int SetForegroundWindow(int hWnd);
+
+ [DllImport("user32.dll")]
+ public static extern void LockWorkStation();
+
+ [DllImport("user32.dll")]
+ public static extern int ExitWindowsEx(int uFlags, int dwReason);
+
+ public struct MEMORYSTATUS // Unused var's are requred here.
+ {
+ public UInt32 dwLength;
+ public UInt32 dwMemoryLoad;
+ public UInt32 dwTotalPhys; // Used
+ public UInt32 dwAvailPhys;
+ public UInt32 dwTotalPageFile;
+ public UInt32 dwAvailPageFile;
+ public UInt32 dwTotalVirtual;
+ public UInt32 dwAvailVirtual;
+ }
+
+ [DllImport("kernel32.dll")]
+ public static extern void GlobalMemoryStatus
+ (
+ ref MEMORYSTATUS lpBuffer
+ );
}
}