GetSystemInfo (kernel32)
Last changed: Milkenm-65.49.2.17

.
Summary

C# Signature:

[DllImport("kernel32.dll")]
static extern void GetSystemInfo(out SYSTEM_INFO lpSystemInfo);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

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());
    }

}

Alternative Managed API:

Do you know one? Please contribute it!

Documentation