1
0

Fixed visibility levels

This commit is contained in:
Benjamin Höglinger-Stelzer 2018-10-24 20:55:23 +02:00
parent 6f5d87fb18
commit 9517de76c2

View File

@ -138,8 +138,6 @@ namespace DerpingDrivers.Util
{ {
var pbits = SoftwareArchitecture.Unknown; var pbits = SoftwareArchitecture.Unknown;
var test = Environment.GetEnvironmentVariables();
switch (IntPtr.Size * 8) switch (IntPtr.Size * 8)
{ {
case 64: case 64:
@ -570,8 +568,7 @@ namespace DerpingDrivers.Util
var name = "unknown"; var name = "unknown";
var osVersion = Environment.OSVersion; var osVersion = Environment.OSVersion;
var osVersionInfo = new OSVERSIONINFOEX(); var osVersionInfo = new OSVERSIONINFOEX {dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX))};
osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX));
if (GetVersionEx(ref osVersionInfo)) if (GetVersionEx(ref osVersionInfo))
{ {
@ -768,7 +765,7 @@ namespace DerpingDrivers.Util
#region PRODUCT INFO #region PRODUCT INFO
[DllImport("Kernel32.dll")] [DllImport("Kernel32.dll")]
internal static extern bool GetProductInfo( private static extern bool GetProductInfo(
int osMajorVersion, int osMajorVersion,
int osMinorVersion, int osMinorVersion,
int spMajorVersion, int spMajorVersion,
@ -787,17 +784,17 @@ namespace DerpingDrivers.Util
#region SYSTEMMETRICS #region SYSTEMMETRICS
[DllImport("user32")] [DllImport("user32")]
public static extern int GetSystemMetrics(int nIndex); private static extern int GetSystemMetrics(int nIndex);
#endregion SYSTEMMETRICS #endregion SYSTEMMETRICS
#region SYSTEMINFO #region SYSTEMINFO
[DllImport("kernel32.dll")] [DllImport("kernel32.dll")]
public static extern void GetSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo); private static extern void GetSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo);
[DllImport("kernel32.dll")] [DllImport("kernel32.dll")]
public static extern void GetNativeSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo); private static extern void GetNativeSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo);
#endregion SYSTEMINFO #endregion SYSTEMINFO
@ -829,7 +826,7 @@ namespace DerpingDrivers.Util
#region SYSTEM_INFO #region SYSTEM_INFO
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct SYSTEM_INFO private struct SYSTEM_INFO
{ {
internal _PROCESSOR_INFO_UNION uProcessorInfo; internal _PROCESSOR_INFO_UNION uProcessorInfo;
public uint dwPageSize; public uint dwPageSize;
@ -848,7 +845,7 @@ namespace DerpingDrivers.Util
#region _PROCESSOR_INFO_UNION #region _PROCESSOR_INFO_UNION
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct _PROCESSOR_INFO_UNION private struct _PROCESSOR_INFO_UNION
{ {
[FieldOffset(0)] internal uint dwOemId; [FieldOffset(0)] internal uint dwOemId;
[FieldOffset(0)] internal ushort wProcessorArchitecture; [FieldOffset(0)] internal ushort wProcessorArchitecture;
@ -860,10 +857,10 @@ namespace DerpingDrivers.Util
#region 64 BIT OS DETECTION #region 64 BIT OS DETECTION
[DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)] [DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
public static extern IntPtr LoadLibrary(string libraryName); private static extern IntPtr LoadLibrary(string libraryName);
[DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)] [DllImport("kernel32", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
public static extern IntPtr GetProcAddress(IntPtr hwnd, string procedureName); private static extern IntPtr GetProcAddress(IntPtr hwnd, string procedureName);
#endregion 64 BIT OS DETECTION #endregion 64 BIT OS DETECTION