Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How much RAM?

Posted on 1998-04-01
4
Medium Priority
?
164 Views
Last Modified: 2010-04-06
How can I detect how much RAM a user has in their PC?
0
Comment
Question by:qwalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361161
procedure TForm1.Button1Click(Sender: TObject);
var   MS: TMemoryStatus;
begin
  GlobalMemoryStatus(MS);
  Caption := FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024);
end;

0
 

Author Comment

by:qwalker
ID: 1361162
Oops, sorry, I forgot to mention I am using Delphi v1.
0
 
LVL 6

Accepted Solution

by:
Stuart_Johnson earned 80 total points
ID: 1361163
Hi,

Use an API function called MemManInfo.  It returns a record called MemManInfo.  Heres the structure for it:

  TMemManInfo = record
    dwSize: Longint;
    dwLargestFreeBlock: Longint;
    dwMaxPagesAvailable: Longint;
    dwMaxPagesLockable: Longint;
    dwTotalLinearSpace: Longint;
    dwTotalUnlockedPages: Longint;
    dwFreePages: Longint;
    dwTotalPages: Longint;
    dwFreeLinearSpace: Longint;
    dwSwapFilePages: Longint;
    wPageSize: Word;
  end;

For more info, consult the WINAPI.HLP file.

Stuart.
0
 

Author Comment

by:qwalker
ID: 1361164
Thank You
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question