diff options
author | sr55 <[email protected]> | 2010-02-20 18:08:41 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-02-20 18:08:41 +0000 |
commit | b9d00019295781bed79eca280bac798b7bb7c64f (patch) | |
tree | 341aac9ec87d84d71be18a42afe0ee52ef497d3f /win/C#/Functions/Win32.cs | |
parent | e5d5bc94b2217a9eb65857d83d31138d126947e4 (diff) |
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
Diffstat (limited to 'win/C#/Functions/Win32.cs')
-rw-r--r-- | win/C#/Functions/Win32.cs | 54 |
1 files changed, 46 insertions, 8 deletions
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: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ 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;
+
+ /// <summary>
+ /// Win32 API calls
+ /// </summary>
+ public class Win32
{
+ /// <summary>
+ /// Set the Forground Window
+ /// </summary>
+ /// <param name="hWnd">
+ /// The h wnd.
+ /// </param>
+ /// <returns>
+ /// A Boolean true when complete.
+ /// </returns>
[DllImport("user32.dll")]
public static extern bool SetForegroundWindow(int hWnd);
+ /// <summary>
+ /// Lock the workstation
+ /// </summary>
[DllImport("user32.dll")]
public static extern void LockWorkStation();
+ /// <summary>
+ /// Exit Windows
+ /// </summary>
+ /// <param name="uFlags">
+ /// The u flags.
+ /// </param>
+ /// <param name="dwReason">
+ /// The dw reason.
+ /// </param>
+ /// <returns>
+ /// an integer
+ /// </returns>
[DllImport("user32.dll")]
public static extern int ExitWindowsEx(int uFlags, int dwReason);
+ /// <summary>
+ /// System Memory Status
+ /// </summary>
public struct MEMORYSTATUS // Unused var's are required here.
{
public UInt32 dwLength;
@@ -33,6 +62,12 @@ namespace Handbrake.Functions public UInt32 dwAvailVirtual;
}
+ /// <summary>
+ /// Global Memory Status
+ /// </summary>
+ /// <param name="lpBuffer">
+ /// The lp buffer.
+ /// </param>
[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);
+ /// <summary>
+ /// Console Ctrl Event
+ /// </summary>
public enum ConsoleCtrlEvent
{
CTRL_C = 0,
|