From b9d00019295781bed79eca280bac798b7bb7c64f Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 20 Feb 2010 18:08:41 +0000 Subject: WinGui: - Tied Microsoft StyleCop into the build process. - Included a settings file for StyleCop so anyone who picks up the project can use the global project settings. - Started Clearing up Warnings generated by stylecop. - Also included Resharper 5 config files that users can use. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3129 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/Win32.cs | 54 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 8 deletions(-) (limited to 'win/C#/Functions/Win32.cs') diff --git a/win/C#/Functions/Win32.cs b/win/C#/Functions/Win32.cs index b624a8342..b5ca77c06 100644 --- a/win/C#/Functions/Win32.cs +++ b/win/C#/Functions/Win32.cs @@ -1,26 +1,55 @@ /* win32.cs $ - - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ + This file is part of the HandBrake source code. + Homepage: . + It may be used under the terms of the GNU General Public License. */ -using System; -using System.Runtime.InteropServices; - namespace Handbrake.Functions { - class Win32 + using System; + using System.Runtime.InteropServices; + + /// + /// Win32 API calls + /// + public class Win32 { + /// + /// Set the Forground Window + /// + /// + /// The h wnd. + /// + /// + /// A Boolean true when complete. + /// [DllImport("user32.dll")] public static extern bool SetForegroundWindow(int hWnd); + /// + /// Lock the workstation + /// [DllImport("user32.dll")] public static extern void LockWorkStation(); + /// + /// Exit Windows + /// + /// + /// The u flags. + /// + /// + /// The dw reason. + /// + /// + /// an integer + /// [DllImport("user32.dll")] public static extern int ExitWindowsEx(int uFlags, int dwReason); + /// + /// System Memory Status + /// public struct MEMORYSTATUS // Unused var's are required here. { public UInt32 dwLength; @@ -33,6 +62,12 @@ namespace Handbrake.Functions public UInt32 dwAvailVirtual; } + /// + /// Global Memory Status + /// + /// + /// The lp buffer. + /// [DllImport("kernel32.dll")] public static extern void GlobalMemoryStatus ( @@ -42,6 +77,9 @@ namespace Handbrake.Functions [DllImport("kernel32.dll", SetLastError = true)] public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId); + /// + /// Console Ctrl Event + /// public enum ConsoleCtrlEvent { CTRL_C = 0, -- cgit v1.2.3