|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Total Physical Memory mismatch
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. |
|
#2
|
|||
|
|||
|
Check the documentation for the api function, maybe the exact way data is returned is documented.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Total Physical Memory mismatch |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|