🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #3085

Re: Free Resources

#3085
From: Risto Lankinen
Date: Thu, 06 Jun 1991 07:04
38 lines
2078 bytes
James_Bell@f6.n3601.z1.fidonet.org (James Bell) writes:

>> Does anyone know whether it's possible for a program to find out
>> the percentage of remaining free resources, as it is posted in

>The on-disk doc files w/the SDK tell how progman computes the system resources, 
>but I don't think they give a function for it.  If you
>discover/write one, let me know and/or post it!
>JB

Hi!

I've got an (evidently *DANGEROUS!*, but probably working) idea:

Use EnumWindows() (for USER-module) or EnumObjects() (for GDI-module).  Make
the call-back procedure save the DS before doing *anything* else - either by
using .ASM for the call-back procedure or compiling the source containing
it without the '-Gw' switch so, that the DS is not destroyed before you had
a chance to read it.

Basic assumption: The DS upon invocation of the call-back procedure = DGROUP
of the calling-back module, which can be used to calculate the calling-back
module's local heap size and other relevant information.

Disclaimer: Hack it out, but don't make any use of it unless you agree that
doing so is at your own risk only.

Terveisin: Risto Lankinen

P.S. Anyone know, how the 'Luke HeapWalker' enumerates the segments and
retrieves the information it displays on its window?  Must be difficult
and a bit non-standard, because Microsoft had to rewrite it between SDK
versions 2.0 and 3.0 .
-- 
Risto Lankinen / product specialist ***************************************
Nokia Data Systems, Technology Dept *  2                              3   *
THIS SPACE INTENTIONALLY LEFT BLANK * 2 +1 is PRIME!  Now working on 2 -1 *
replies: risto@yj.data.nokia.fi     ***************************************
Technical Details
Message-ID: <1195@tuura.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!sics.se!fuug!tuura!risto
References: <funpack118009@f1.n6000.z2.fidonet.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!sics.se!fuug!tuura!risto
From: risto@tuura.UUCP (Risto Lankinen)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Free Resources
Message-ID: <1195@tuura.UUCP>
Date: 6 Jun 91 07:04:54 GMT
References: <funpack118009@f1.n6000.z2.fidonet.org>
Organization: Nokia Data Systems Oy
Lines: 38