// JP opened flex table

Click to See Complete Forum and Search --> : uint64 in WMI


gabirata
September 16th, 2007, 01:11 PM
I'm trying to get the memory module size using the class Win32_PhysicalMemory.

The attribute Capacity has the type uint64. So I used the following code:


hr = pclsObj->Get(L"Capacity", 0, &vtProp, 0, 0);
long long size= vtProp.ullVal;
wcout << "size = " << size<< endl;


but it prints a very large value that I Know is not a valid one;
My memory has 256MB, so it should return something like 268435456 (256 * 1024 * 1024) once the return value is in bytes.

I'm missing something?

Alternatively, there is other way of list the memory module and its size?

Thanks in advance!

//JP added flex table