I have developed a
VB app using visual basic 6. This will display the total physical memory in the system and other configuration details.
My system has 512 MB physical memory. If i open My Computer --> Properties, it shows 512 MB of RAM.
But my app shows only 511.01 MB. Why this difference ?
I am using the following Win32 API in my app for getting the total physical memory:
Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS)
The function for getting the total physical memory is
Private Function GetMemory() As String
Dim BytesTotal As Double
Dim memInfo As MEMORYSTATUS
GlobalMemoryStatus memInfo
BytesTotal = memInfo.dwTotalPhys
GetMemory = Format(CStr((BytesTotal / 1024) / 1024), "0.00")
End Function
Any help is highly appreciated. Please help me...
Thanks in advance.