summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/Win32.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-12 14:19:19 +0000
committersr55 <[email protected]>2009-06-12 14:19:19 +0000
commite9bbd49dc361b3e40300553f501e20877f637792 (patch)
tree591e00d78d3d7ed1fde05b4b4795324ffde6dd0c /win/C#/Functions/Win32.cs
parentff7639bdf5ae1cd3977ca16f0a0892d58f554f7a (diff)
WinGui:
- Move all DllImports into win32.cs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2523 b64f7644-9d1e-0410-96f1-a4d463321fa5
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
+ );
}
}