updated ptrguard to use system_info for minimum calculations
This commit is contained in:
@@ -32,5 +32,24 @@ namespace LightlessSync.Utils
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
internal static extern nint GetCurrentProcess();
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
internal static extern void GetSystemInfo(out SYSTEM_INFO lpSystemInfo);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct SYSTEM_INFO
|
||||
{
|
||||
public ushort wProcessorArchitecture;
|
||||
public ushort wReserved;
|
||||
public uint dwPageSize;
|
||||
public nint lpMinimumApplicationAddress;
|
||||
public nint lpMaximumApplicationAddress;
|
||||
public nint dwActiveProcessorMask;
|
||||
public uint dwNumberOfProcessors;
|
||||
public uint dwProcessorType;
|
||||
public uint dwAllocationGranularity;
|
||||
public ushort wProcessorLevel;
|
||||
public ushort wProcessorRevision;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user