What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » GlobalMemoryStatusEx function???

GlobalMemoryStatusEx function???
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: GlobalMemoryStatusEx function???
Javascript code:
/*
    typedef struct _MEMORYSTATUSEX {
      DWORD     dwLength;                       0
      DWORD     dwMemoryLoad;                   4
      DWORDLONG ullTotalPhys;                   8
      DWORDLONG ullAvailPhys;                   16
      DWORDLONG ullTotalPageFile;               24
      DWORDLONG ullAvailPageFile;               32
      DWORDLONG ullTotalVirtual;                40
      DWORDLONG ullAvailVirtual;                48
      DWORDLONG ullAvailExtendedVirtual;        56
    } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
*/

var DIV = 1024;
var _MEMORYSTATUSEX = Interop.Allocate(64);
    _MEMORYSTATUSEX.WriteDWORD(0, _MEMORYSTATUSEX.Size);
Debut.Trace('RetVal: '+Interop.Call('kernel32', 'GlobalMemoryStatusEx', _MEMORYSTATUSEX));
 
Debug.Trace('There is '+_MEMORYSTATUSEX.ReadDWORD(4)+' percent of memory in use.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(8)/DIV+' total KB of physical memory.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(16)/DIV+' free  KB of physical memory.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(24)/DIV+' total KB of paging file.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(32)/DIV+' free  KB of paging file.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(40)/DIV+' total KB of virtual memory.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(48)/DIV+' free  KB of virtual memory.');
Debug.Trace('There are '+_MEMORYSTATUSEX.ReadDWORD(56)/DIV+' free  KB of extended memory.');

09-14-2012 12:13 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
GlobalMemoryStatusEx function??? - by agustin029 on 09-14-2012 at 01:22 AM
RE: GlobalMemoryStatusEx function??? - by Spunky on 09-14-2012 at 07:39 AM
RE: GlobalMemoryStatusEx function??? - by matty on 09-14-2012 at 12:13 PM
RE: GlobalMemoryStatusEx function??? - by agustin029 on 09-15-2012 at 02:47 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On