After seeing the post about the MemorySize Function limit, it reminded me of an old batch file we used to use to determine memory. Converting it was somewhat of a journey, but I think I have done it... Anyone care to see if it works for memory over 2 gigs, or just see what results it give you?



break on
memory()

function memory()
  dim $hexdmp, $hex, $counter, $hexvals, $memkey, $vals
  $memkey="HKEY_LOCAL_MACHINE\hardware\resourcemap\system resources\physical memory"
  $hexdmp=readvalue($memkey,".Translated")
  for $start = 1 to len($hexdmp) step 8
    $hex=""
    for $counter = 0 to 7 step 2
      $hex=substr($hexdmp,$start + $counter,2)+$hex
    next
    if $hexvals=""
      $hexvals=$hex
    else
      $hexvals=$hexvals + "|" + $hex
    endif
  next
  $vals=split($hexvals,"|")

  for $counter= 8 to ubound($vals) step 4
   $nul=execute("$$memory=0.0 + $$memory + &"+$vals[$counter]+"/1024")
  next
  $memory=int(($memory +648)/1024)
endfunction




[ 13. July 2003, 07:18: Message edited by: Al_Po ]
_________________________
(... better days ahead)