Solved

System Resources

Posted on 1998-06-19
11
293 Views
Last Modified: 2010-04-04
Under WIN 3.1 there was the API-function
getfreesystemresources.
Under WIN95 or WIN NT4.0 this function is not available.
But i am sure, that there will be an equivalent.
I want to know either in percent or in bytes how many resources are used (or free).
0
Comment
Question by:titz
[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
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 5

Expert Comment

by:Tom Knowlton
ID: 1354182
This is from the HELP for Delphi 2.  Does this help?  Just open help and tyep GLOBALMEMORYSTATUS

________Here it is_________

The GlobalMemoryStatus function retrieves information about current available memory. The function returns information about both physical and virtual memory. This function supersedes the GetFreeSpace function.

VOID GlobalMemoryStatus(

    LPMEMORYSTATUS  lpBuffer       // pointer to the memory status structure  
   );      
Parameters

lpBuffer

Points to a MEMORYSTATUS structure in which information about current memory availability is returned. Before calling this function, the calling process should set the dwLength member of this structure.

Return Value

This function does not return a value.

Remarks

An application can use the GlobalMemoryStatus function to determine how much memory it can allocate without severely impacting other applications.
The information returned is volatile, and there is no guarantee that two sequential calls to this function will return the same information.

See Also

MEMORYSTATUS
0
 
LVL 1

Author Comment

by:titz
ID: 1354183
MEMORYSTATUS only shows the use of (some kind of) memory, but not the use of resources. That's very different.
I want to see the use of resources for I want to know wether in my program are some resources which are not destroyed.

0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1354184
See 'Resource Monitor'  in 'Sample Code' section in the 'Delphi Source':
http://www.doit.com/delphi/
or I can send you the zip file by EMail.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:ronit051397
ID: 1354185
sorry, I have just checked it and it doesn't complie with Delphi32.
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1354186
I have done some checking:
If you are working with Win95, then the file rsrc32.dll located in <WinSysDir> includes the function GetFreeSystemResources and you should call it directly from that dll, because Delphi32 doesn't have a unit for that.
As for WinNT I don't know the answer because it doesn't have the rsrc32.dll
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1354187
0
 
LVL 1

Author Comment

by:titz
ID: 1354188
"Getfreesystemresources" is only available under 16Bit.
That is my trouble.
I am looking for a good equivalent under 32Bit and delphi3.
And i need it under WIN95, WIN98 and NT4.0

0
 

Accepted Solution

by:
ms99y earned 50 total points
ID: 1354189

Hi, titz

 I am giving the information that I have found from the MSD,

 there’s no way in Win32 to get this kind of information. If you want to know the free system resources in a Win32-based program, you’ll need to thunk down to a 16-bit DLL and call SystemHeapInfo or GetFreeSystemResources. This is what SHELL32.DLL does to display the free system resources in the About boxes of all the standard Windows 95 utilities.


Later,
0
 

Expert Comment

by:ms99y
ID: 1354190

Hi, titz

 I am giving the information that I have found from the MSD,

 there’s no way in Win32 to get this kind of information. If you want to know the free system resources in a Win32-based program, you’ll need to thunk down to a 16-bit DLL and call SystemHeapInfo or GetFreeSystemResources. This is what SHELL32.DLL does to display the free system resources in the About boxes of all the standard Windows 95 utilities.


Later,
0
 

Expert Comment

by:ms99y
ID: 1354191

Sorry for doubling the message..
0
 
LVL 1

Author Comment

by:titz
ID: 1354192
Appearantly this seems the only way: in 32bit calling a 16bit routine !
What a pity!

But thanks to ms99y !
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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