?
Solved

System Resources

Posted on 1998-06-19
11
Medium Priority
?
295 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 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 100 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

Technology Partners: 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!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

801 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