473,396 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to check RAM memory on 64 bit windows XP

Hi All,

I used GlobalMemoryStatus API function checking RAM memory in my
windows application, it worked fine. Recently there are some 64 bit
Windows XP user complain that they got error message from memory
check. How can I check 64 bit windows correctly?

Thanks!

Jul 18 '07 #1
2 6382
"snow" <ba**********@yahoo.comschrieb:
I used GlobalMemoryStatus API function checking RAM memory in my
windows application, it worked fine. Recently there are some 64 bit
Windows XP user complain that they got error message from memory
check.
Post your function declaration and function call.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jul 18 '07 #2

I understood you would better use the ex function

Public Structure MEMORYSTATUSEX
Public dwLength As Integer
Public dwMemoryLoad As Integer
Public ullTotalPhys As ULong
Public ullAvailPhys As ULong
Public ullTotalPageFile As ULong
Public ullAvailPageFile As ULong
Public ullTotalVirtual As ULong
Public ullAvailVirtual As ULong
Public ullAvailExtendedVirtual As ULong
End Structure

<DllImport("kernel32.dll", SetLastError := True)_
Private Shared Function GlobalMemoryStatusEx(ByRef lpBuffer As
MEMORYSTATUSEX) As Boolean
End Function

'
Public Function GetTotalMemory() As ULong
Dim memStat As New MEMORYSTATUSEX()
memStat.dwLength = 64
Dim b As Boolean = GlobalMemoryStatusEx(memStat)
Return memStat.ullTotalPhys
End Function

regards

Michel

"snow" <ba**********@yahoo.comschreef in bericht
news:11**********************@i13g2000prf.googlegr oups.com...
Hi All,

I used GlobalMemoryStatus API function checking RAM memory in my
windows application, it worked fine. Recently there are some 64 bit
Windows XP user complain that they got error message from memory
check. How can I check 64 bit windows correctly?

Thanks!

Jul 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: fremenusul | last post by:
I know I have been asking LOTS of xml questions and I really apprecaite all the help. Here is my XML file <?xml version="1.0" encoding="utf-8" ?> <products> <!-- Repeat the structure below...
2
by: Jarvis | last post by:
I've made a testing program to test the memory usage of some Data Forms. I create a MDI parent form with one single MDI child form, which is a Data Form generated by .NET Data Form Wizard. To...
8
by: Bob | last post by:
I'm trying to decide on what data types to put into my caching object (a class with a static instance of Hashtable). I'm facing the choice of either putting the string values or SqlParameter...
9
by: Mike P | last post by:
I know everything about reference counting and making sure you don't have large objects lying around. I have also profiled my app with multiple tools. I know about the fact GC collects memory but...
4
by: Geir Baardsen | last post by:
Hi! Is there any way to check if printer is active in access 2000? I have a report that is printing (local printer), and before I do anything more in code, I do want to check if printer is...
11
by: zhong | last post by:
Error Message: Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention...
11
by: Pete Davis | last post by:
I have an app that's dealing with a few hundred bitmap thumbnails. I only instantiate the bitmaps that are visible at a given time and dispose of them if they get scrolled out of view. I've used...
2
by: Ilkka | last post by:
I have created an C++ application with Windows Forms, ADO and SQL server 2005. Now I need to change something and started debugging the code. Then suddenly I receive an error. "An unhandled...
2
by: Sticker | last post by:
My question is, I want my program A have the ability to know how much memory is used by itself. So after it finishes certain function, it can print the total memory usage of itself to screen. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.