{
#region [ CPUコア数の取得 ]
CWin32.SYSTEM_INFO sysInfo = new CWin32.SYSTEM_INFO();
- CWin32.GetSystemInfo(ref sysInfo);
+ CWin32.GetSystemInfo(out sysInfo);
int nCPUCores = (int)sysInfo.dwNumberOfProcessors;
#endregion
#region [ BMP読み込み ]
[DllImport( "user32.dll", CharSet = CharSet.Auto, SetLastError = true )]
public static extern bool SystemParametersInfo( uint uiAction, uint uiParam, IntPtr pvParam, uint fWinIni );
[DllImport( "kernel32.dll" )]
- public static extern void GetSystemInfo( ref SYSTEM_INFO ptmpsi );
+ public static extern void GetSystemInfo( out SYSTEM_INFO ptmpsi );
[DllImport( "kernel32.dll" )]
internal static extern ExecutionState SetThreadExecutionState( ExecutionState esFlags );
{
public uint dwOemId;
public uint dwPageSize;
- public uint lpMinimumApplicationAddress;
- public uint lpMaximumApplicationAddress;
- public uint dwActiveProcessorMask;
+ public IntPtr lpMinimumApplicationAddress;
+ public IntPtr lpMaximumApplicationAddress;
+ public IntPtr dwActiveProcessorMask;
public uint dwNumberOfProcessors;
public uint dwProcessorType;
public uint dwAllocationGranularity;
- public uint dwProcessorLevel;
- public uint dwProcessorRevision;
+ public ushort dwProcessorLevel;
+ public ushort dwProcessorRevision;
}
public struct BATTERY_REPORTING_SCALE
{
{
#region [ CPU論理コア数の取得 (HT含む) ]
CWin32.SYSTEM_INFO sysInfo = new CWin32.SYSTEM_INFO();
- CWin32.GetSystemInfo(ref sysInfo);
+ CWin32.GetSystemInfo(out sysInfo);
int nCPUCores = (int)sysInfo.dwNumberOfProcessors;
#endregion