Link to home
Start Free TrialLog in
Avatar of rascal
rascalFlag for United States of America

asked on

Propertly detecting memory slots and memory with WMI?

Our Win32 app has successfully detected memory slots and associated memory on machines in the past by using SMBios calls. But we recently moved to using WMI calls.

However, running on newer Dell machines (Dell GX280 with Windows 2003 sp1 for example) are reporting odd,incorrect results.

The machine has 4 memory slots, with 2 containing memory chips, but our results are showing all slots containing memory.

To fetch the slot configuration we first query: select * from win32_memorydevices.
Then for each row returned, we fetch the ASSOCIATORS of the row where the class is Win32_physicalmemory:

CString strQuery = "ASSOCIATORS OF {Win32_MemoryDevice.DeviceID=\"";
                                    strQuery += sMemoryDeviceID;
                                    strQuery += "\"} WHERE ResultClass = Win32_PhysicalMemory";

There must be a problem in our queries. Is these the proper queries to execute to determine the number of slots, and then whether or not each slot has memory in it and how much?

Thanks experts!
ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rascal

ASKER

Hi graye

I don't have a .net platform handy to run the above, but the equivalent script run in wbemtest showed the 2 sockets in use (out of the 4 on the machine).

All the fields looked normal, but it was telling that the banklabel was 0 and 2 respectively for the 2 sockets. Seems to lend support to the concept that access or visibility to all 4 sockets is blocked, but the ones that do report do show their proper bank label.

I wonder if I should just assume that if there is a gap in the reporting of the sockets that I should just "fill in the gaps" since they always have to appear in 2's?

Thanks,
Mark
hummm....

Perhaps the two pairs of physical "dual port" slots are *supposed* to appear as two logical slots?