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.cs54
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,