> --- In [email protected], "qzzyyx" <BlackHole@> wrote:
> >
> > I'm using PowerPro version 4.9. I constantly see pmem = 2048.
> > What version do I need to see pmem up to 3 GB? Please post a
> > link. Thanks.
> >
--- In [email protected], "Peter" <pjaga...@...> wrote:
>
> See this post:
> 
> http://tech.groups.yahoo.com/group/power-pro/message/33092
>
 
That looks familiar. At some point I tried to implement that script on the 
tooltip of a button but I had problems with it. Can't remember the exact 
details but over time the static variable ms got corrupted. Possibly my dll 
plugin was getting restarted or unloaded at some point by other scripts or use 
of pproconf. So I made some changes.

This is the version I still use:

global dll_status
static ms
Exec.OnError("none")
_LastError_=""
if (ms !=="")
  dll.call("GlobalMemoryStatusEx|t*", ms)
if (_LastError_ !=="")
  ms=""
Exec.OnError("display")
if (not ms) do
ms = dll.create_struct("ui[2] uh[7]")
endif
ms[1] = ms.size
static divider = 1024*1024
dll.call("GlobalMemoryStatusEx|t*", ms)
local totphys = int64.divide(ms[3], divider)
if (not totphys)
  quit("Error, dll call apparently failed, no totphys memory reported.")
local freephys = int64.divide(ms[4], divider)
quit((100*freephys+5)/totphys ++ "%")

Regards,
Sheri


Reply via email to