🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5352

GlobalMemoryStatus API call

#5352
From: Serge Poirier
Date: Mon, 05 Sep 2005 14:06
19 lines
1547 bytes
Good Day Folks,

I'm using the function GlobalMemoryStatus to display memory information to 
the user.
But it seems that the reported values are slightly higher than what is
reported by WinXP task manager, from 18-25KB

The code I'm using is shown below.

char buffer[sizeof(MEMORYSTATUS)];
MEMORYSTATUS lpBuffer;
GlobalMemoryStatus(&lpBuffer);  // pointer to the memory status structure

Label1->Caption=String(lpBuffer.dwTotalPhys);
Label2->Caption=String(lpBuffer.dwAvailPhys);

Any ideas ?
Thanks in advance.
/Serge
Technical Details
Message-ID: <431c5080$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!213.218.66.70.MISMATCH!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!feeder.xsnews.nl!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,169c1dcd06345ac4,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Serge Poirier" <c28560@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: GlobalMemoryStatus API call
Date: Mon, 5 Sep 2005 10:06:02 -0400
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.196.191.99
Message-ID: <431c5080$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1125929088 69.196.191.99 (5 Sep 2005 07:04:48 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!213.218.66.70.MISMATCH!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!feeder.xsnews.nl!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail