Dec 142017
 
Resource Guage for Microsoft Windows, with C source code.
File RSGAGE.ZIP from The Programmer’s Corner in
Category Windows 3.X Files
Resource Guage for Microsoft Windows, with C source code.
File Name File Size Zip Size Zip Type
MAKEFILE 1007 365 deflated
RESGAUGE.C 29745 5534 deflated
RESGAUGE.DEF 1151 554 deflated
RESGAUGE.EXE 9184 4773 deflated
RESGAUGE.H 1144 360 deflated
RESGAUGE.ICO 766 184 deflated
RESGAUGE.RC 2445 818 deflated
RESGAUGE.WRI 7040 2986 deflated

Download File RSGAGE.ZIP Here

Contents of the RESGAUGE.WRI file


13666667ResGauge v1.1
Richard Franklin Albury
851 SW 120th Way
Davie, Florida 33325
CIS: 76477,534


What is ResGauge?
ResGauge is a simple, nonintrusive little utility which monitors free system resources in Windows 3.0 and 3.1. ResGauge started off as a simple utility about nine months ago. I'd read some questions in the Windows forums on CompuServe about how to determine free system resources, I'd come across some information on the actual undocumented call used to do this, and I cobbled together a crude little utility in a few hours and uploaded it. Some people actually downloaded it and used it, and based on their suggestions, I took my crude little utility and smoothed some of the rough edges.

What are free system resources anyway?
However much I may like some things about Windows - even though I started off on a Macintosh and I contract for IBM on OS/2 development - it annoys the heck out of me that a system capable (in theory) of managing 64 MB of memory - 16 MB actual, 48 MB virtual - is held in check by two little 64 KB chunks of memory. Windows is essentially made up of three dynamic link libraries: the system module, the GDI (Graphics Device Interface) module, and the User (interface) module. The GDI and User DLLs each have a local heap, an area of memory in which they allocate memory for their own use. Since a local heap can't exceed 64 KB, each DLL is limited in the amount of memory it can allocate for its own use, giving rise to the notion of free system resources, usually expressed as the percentage of a DLL's local heap currently free. The number you see in the About Program Manager... dialog is the smaller of these two percentages, and this number will change as programs load and free menus, icons, and other interface resources. Not surprisingly, Program Manager is one of the worst offenders in exhausting free system resources: every time you open a group window, Program Manager loads the program icons but it doesn't free them when the window is subsequently closed. This won't be the case for Windows 3.1, I believe.

What's the catch?
Version 1.1, like version 1.0 before it, is distributed with the source and this document, and all I ask is that the package remain together. I placed the initial version in the public domain, but this time I will ask for some compensation, sort of. Being an election year, and given that things don't seem to be getting much better - especially the environment! - I'm going to ask that if you use this utility and decide to keep it, you're obligated to get out and vote. I'm not going to let you off as lightly as it may appear, however: you're also going to have to give some careful thought to whom and what you vote for. 🙂

How does it work?
ResGauge only runs as an icon, and only one copy of it can run at a time. To do things any other way didn't make much sense. The system menu has all the irrelevant items removed - Restore, Size, Minimize, and Maximize - and two new items added. The About... item is the usual shameless blurb, but the Configure... item is where ResGauge shows its improvements. The dialog which comes up when you select Configure... allows you to modify ResGauge's operation in some interesting and unique ways.

What are all these settings for?
The Monitor section allows you to specify which of the two local heaps to monitor; you can also monitor both, and the number reported by ResGauge will be the smaller of the two. This is also the number reported by Program Manager, although I have noticed that ResGauge occasionally differs from Program Manager by one.
The Alarm section allows you to set ResGauge to either beep or flash its icon when free system resources drop below the specified level. This is useful if you're more interested in getting work done than staring at my little program, so setting the alarm will give you a chance to save your work when system resources get low. If the beeping or the flashing annoy you, you can also turn this feature off.
The Keep on top option will "float" the ResGauge icon on top of the active window. This allows you to run your programs maximized but still keep an eye on things.
Finally, there are three buttons at the bottom of the Configure... dialog. Save saves all the changes you've made to a private initialization file so that ResGauge will "remember" its settings the next time it runs. Apply lets you continue to run with the changes you've made without saving them, and Cancel undoes any changes you've made.

Who helped you?
I wrote this program by myself. Honestly! I did have some helpful suggestions from the following folks, though:
Anthony W. Rairden for the USER/GDI/Both options and the alarm threshhold idea
Greg Saddler for the Keep on top option

Aren't you done yet?
Almost. I'd like to say in closing that if you have any comments, kudos, complaints, or suggestions, I'd like to hear them. If you have any ideas for any other utilities you'd like to see, I'd love to see them. Finally, I'm moving to the Raleigh (North Carolina) area this summer, so if you know of anybody who needs a decent Windows programmer, I'm available.
ry) of managing 64 MB of memory - 16 MB actual, 48 MB virtual - is held wuqgmoiKesa]XTPLI>$wrm
n
i4eOa]XTPKLI
wsojfb^Y"UCQDMEHEKwwsxoyjfb^ZVQM
I

w=
s_
oc
kj
g
c
_d[lWSOKw]Y6UGQMIwrnjea]XT
PLH v*r5nKjfa]XT
PLHxxxxxxxvIkKksi^^\<
c=
c_
aV8VV4V6VGT^\<
p3p5pKncc8VV4V6VGT^\<
CG Times Univers going to let you off as lightly as it may appear, however: you're also going to have to give some ca


 December 14, 2017  Add comments

Leave a Reply