[DllImport("kernel32.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetPhysicallyInstalledSystemMemory(out long MemoryInKilobytes);
Declare Function GetPhysicallyInstalledSystemMemory Lib "kernel32.dll" (TODO) As Boolean
None.
Do you know one? Please contribute it!
None.
Please add some!
public class Program
{
[DllImport("kernel32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetPhysicallyInstalledSystemMemory(out long TotalMemoryInKilobytes);
static void Main()
{
long l;
GetPhysicallyInstalledSystemMemory(out l);
Console.WriteLine((l / 1000) + "MB of RAM installed.");
Console.ReadLine();
}
}