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.cs99
1 files changed, 48 insertions, 51 deletions
diff --git a/win/C#/Functions/Win32.cs b/win/C#/Functions/Win32.cs
index a50102688..c2e785075 100644
--- a/win/C#/Functions/Win32.cs
+++ b/win/C#/Functions/Win32.cs
@@ -47,62 +47,13 @@ namespace Handbrake.Functions
public static extern int ExitWindowsEx(int uFlags, int dwReason);
/// <summary>
- /// System Memory Status
- /// </summary>
- public struct MEMORYSTATUS // Unused var's are required here.
- {
- /// <summary>
- /// Unknown
- /// </summary>
- public UInt32 dwLength;
-
- /// <summary>
- /// Memory Load
- /// </summary>
- public UInt32 dwMemoryLoad;
-
- /// <summary>
- /// Total Physical Memory
- /// </summary>
- public UInt32 dwTotalPhys; // Used
-
- /// <summary>
- /// Available Physical Memory
- /// </summary>
- public UInt32 dwAvailPhys;
-
- /// <summary>
- /// Total Page File
- /// </summary>
- public UInt32 dwTotalPageFile;
-
- /// <summary>
- /// Available Page File
- /// </summary>
- public UInt32 dwAvailPageFile;
-
- /// <summary>
- /// Total Virtual Memory
- /// </summary>
- public UInt32 dwTotalVirtual;
-
- /// <summary>
- /// Available Virtual Memory
- /// </summary>
- public UInt32 dwAvailVirtual;
- }
-
- /// <summary>
/// Global Memory Status
/// </summary>
/// <param name="lpBuffer">
/// The lp buffer.
/// </param>
[DllImport("kernel32.dll")]
- public static extern void GlobalMemoryStatus
- (
- ref MEMORYSTATUS lpBuffer
- );
+ public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);
/// <summary>
/// Generate a Console Ctrl Event
@@ -141,7 +92,7 @@ namespace Handbrake.Functions
}
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
+ public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
[FlagsAttribute]
public enum EXECUTION_STATE : uint
@@ -166,5 +117,51 @@ namespace Handbrake.Functions
{
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);
}
+
+ /// <summary>
+ /// System Memory Status
+ /// </summary>
+ public struct MEMORYSTATUS // Unused var's are required here.
+ {
+ /// <summary>
+ /// Unknown
+ /// </summary>
+ public UInt32 dwLength;
+
+ /// <summary>
+ /// Memory Load
+ /// </summary>
+ public UInt32 dwMemoryLoad;
+
+ /// <summary>
+ /// Total Physical Memory
+ /// </summary>
+ public UInt32 dwTotalPhys; // Used
+
+ /// <summary>
+ /// Available Physical Memory
+ /// </summary>
+ public UInt32 dwAvailPhys;
+
+ /// <summary>
+ /// Total Page File
+ /// </summary>
+ public UInt32 dwTotalPageFile;
+
+ /// <summary>
+ /// Available Page File
+ /// </summary>
+ public UInt32 dwAvailPageFile;
+
+ /// <summary>
+ /// Total Virtual Memory
+ /// </summary>
+ public UInt32 dwTotalVirtual;
+
+ /// <summary>
+ /// Available Virtual Memory
+ /// </summary>
+ public UInt32 dwAvailVirtual;
+ }
}
}