Solved

System resources ...

Posted on 1998-06-11
14
193 Views
Last Modified: 2010-07-27
how can i display 'physical memory available' and 'system resources', like in 'notepad', menu help -> about notepad ?
i've tried to use winapi, GlobalMemoryStatus() but the return value is always wrong, is there any others function that i can use for this task ? or maybe any suggestion in using GlobalMemoryStatus() ? ( maybe i'm using GlobalMemoryStatus() in the wrong way )

thank's ;-)
0
Comment
Question by:de_ep
14 Comments
 

Author Comment

by:de_ep
ID: 1352248
Edited text of question
0
 

Expert Comment

by:heapster
ID: 1352249
GetFreeSystemResources(GFSR_SYSTEMRESOURCES))
0
 
LVL 1

Expert Comment

by:michaue
ID: 1352250
How about using one of the following available from http://torry.rimini.com under SYSTEM COMPONENTS #1 and #2 (AND I SUPPOSE THERE'S EVEN MORE UNDER #3 and #4)

TSysInfo V1.1
TxSysInfo v1.00
ESysInfo v1.5
InoSystem Info  v1.0
System Info v1.1

One of them WILL work ...
0
 

Author Comment

by:de_ep
ID: 1352251
thank's heapster, but that function you proposed is obsolete, now it was change by GlobalMemoryStatus.
is there any other way than using a component, because i need my program to be small ?
0
 

Author Comment

by:de_ep
ID: 1352252
Adjusted points to 30
0
 
LVL 1

Expert Comment

by:pjdb
ID: 1352253
Is it for NT or Win95?
0
 

Author Comment

by:de_ep
ID: 1352254
it is for Win95, but i if you have any idea in WinNT it's okay too. i'm now in a project of making a 'telephone billing system', right now i made the Win95 version, and my next project is WinNT version. actually my problem is everytime i call GlobalMemoryStatus, the value return for dwMemoryLoad is always 100%. it is wrong, am i right ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Accepted Solution

by:
ronit051397 earned 30 total points
ID: 1352255
var
  FVer: TOSVERSIONINFO;
  MS: TMemoryStatus;
begin
  GlobalMemoryStatus(MS);
  showmessage('Total physical memory is: '+FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024));
  showmessage('Physical memory available: '+FormatFloat('#,###" KB"', MS.dwAvailPhys / 1024));
end;

0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1352256
Hi, well did it worked?
0
 

Author Comment

by:de_ep
ID: 1352257
well, thank's ronit ( sorry to take you so long to wait my evaluation, my internet connection had been down for several days ).
The first code i've used is like the code that you proposed to me but every time i call the function, its always return 100 for the dwMemoryLoad. what i need to know is how much is my computer 'System resource' like if you go to notepad and choose menu help and about notepad, you can find how much is your computer system resource.
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1352258
Did you do exactly what I have posted?
I have tested it on NT and it works fine, just like the notepad.
dwTotalPhys tells you how much physical memory you have in your computer.

dwMemoryLoad Specifies a number between 0 and 100 that gives a general idea of current memory utilization, in which 0 indicates no memory use and 100 indicates full memory use, so it's not what you need. for more information see WinApi help.

0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1352259
Did you do exactly what I have posted?
I have tested it on NT and it works fine, just like the notepad.
dwTotalPhys tells you how much physical memory you have in your computer.

dwMemoryLoad Specifies a number between 0 and 100 that gives a general idea of current memory utilization, in which 0 indicates no memory use and 100 indicates full memory use, so it's not what you need. for more information see WinApi help.

0
 

Author Comment

by:de_ep
ID: 1352260
thank's a lot ronit, i've tried exactly like that you have posted, maybe it's not what i need, by the way thank's a lot you have tried to help me ;-).
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1352261
Bought This Question.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, MySQL Query 4 126
HTML text in the body of an email (delphi code) 12 96
Delphi IDE crash without error message ... 7 76
creating threads in delphi 1 82
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now