From e9bbd49dc361b3e40300553f501e20877f637792 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 12 Jun 2009 14:19:19 +0000 Subject: WinGui: - Move all DllImports into win32.cs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2523 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/Win32.cs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'win/C#/Functions/Win32.cs') 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 + ); } } -- cgit v1.2.3