I know that it is possible to check how much physical RAM is installed using GetPhysicallyInstalledSystemMemory
or how much ram the operating system can see using GlobalMemoryStatusEx
. However, I am wondering if there is any way to check how much ram a user has installed by slot. That is, to be able to programmatically tell the difference between 1x2GB of ram and 2x1GB of ram, thus checking if the computer can be upgraded easily via software. Ideally, a way to check this without .Net.
views:
614answers:
4Reviewing the MSDN docs for the functions listed here, I see that the function checks with the SMBIOS table, which is referenced by a standard here It appears that you indeed can find the information you seek through the BIOS. You may have to install a driver to get that information out to your program.
Good luck!
Use WMI to look at Win32_PhysicalMemory. Look at the Capacity and Bank Label properties.
UPDATED: You do not need .NET for this. See Creating a WMI Application Using C++.aspx) for examples in C++
On Linux, I can almost always find that information with dmidecode, which parses the DMI tables from the BIOS. It shows all the memory slots and what is on each one, together with other interesting information. I don't know how to get the DMI data on Windows, however.