Article View: comp.os.ms-windows.programmer.misc
Article #2094M% in U,G,M - HELP!
From: Mark Pietrasanta
Date: Tue, 17 Nov 1992 15:52
Date: Tue, 17 Nov 1992 15:52
36 lines
1689 bytes
1689 bytes
Okay. I can get the User and GDI percentages, but I can't get the
Memory percentage. This is what I'm currently doing:
unsigned int UserP, GDIP;
unsigned long MemP;
MEMMANINFO lpmmi;
UserP = GetFreeSystemResources(GFSR_USERRESOURCES);
GDIP = GetFreeSystemResources(GFSR_GDIRESOURCES);
lpmmi.dwSize = sizeof(lpmmi);
MemManInfo(&lpmmi);
MemP = ((lpmmi.dwMaxPagesAvailable*100)/lpmmi.dwTotalLinearSpace);
wsprintf(resources, "U%02i G%02i M%02i\0", UserP, GDIP, MemP);
But this seems to be returning the percentage of free _contiguous_
pages, not total free pages. I've tried the other pieces of the record
to no avail (all the ones with Total in them).
I thought I had it licked with this one, but NOPE!
Any help would be GREATLY appreciated, as I've run out of ideas.
Please e-Mail and I'll post the results.
Thanks,
Mark Pietrasanta - mpiet@is.morgan.com
* * * * * * * * *
"Great spirits have always encountered violent opposition from
mediocre minds." - Albert Einstein
----------------------------------------------------------------
Disclaimer: These responses are my own and in no way reflect the
views of my employer.
----------------------------------------------------------------
Technical Details
Message-ID:
<1992Nov17.105211@is.morgan.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!s5!is1.is.morgan.com!is.morgan.com!mpietShow Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!s5!is1.is.morgan.com!is.morgan.com!mpiet From: mpiet@is.morgan.com (Mark Pietrasanta) Subject: M% in U,G,M - HELP! Message-ID: <1992Nov17.105211@is.morgan.com> Sender: news@is.morgan.com Nntp-Posting-Host: is11 Organization: Morgan Stanley - IS Date: Tue, 17 Nov 1992 15:52:11 GMT Lines: 36