[DllImport("kernel32.dll")]
static extern void GetSystemInfo(out SYSTEM_INFO lpSystemInfo);
None.
None.
Please add some!
public class winapi
{
[DllImport("kernel32.dll")]
public static extern void GetSystemInfo ([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo);
[StructLayout(LayoutKind.Sequential)]
public struct SYSTEM_INFO
{
public uint dwOemId;
public uint dwPageSize;
public uint lpMinimumApplicationAddress;
public uint lpMaximumApplicationAddress;
public uint dwActiveProcessorMask;
public uint dwNumberOfProcessors;
public uint dwProcessorType;
public uint dwAllocationGranularity;
public uint dwProcessorLevel;
public uint dwProcessorRevision;
}
}
public class Class1
{
public void main(string[] args)
{
winapi.SYSTEM_INFO sysinfo = new winapi.SYSTEM_INFO();
winapi.GetSystemInfo(ref sysinfo);
Console.WriteLine(sysinfo.dwProcessorType.ToString());
}
}
Do you know one? Please contribute it!