Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: WinResources virtual memory BinaryIndex mem swap file size
Another possibility, under Windows 3.X, is to do something like:
In a DOS window, you could do a:
MEM > filename
Then use BinaryIndexNC to look for the Extended (XMS) size in a file buffer, and then extract that value with BinaryPeekStr. But it will not be your real dos memory, just an emulation.
It's going to be tricky. By the time windows starts and WinBatch can run, you don't get a real DOS Box anymore, merely an emulation.
Similarly, if you added a line in the autoexec.bat file like:
MEM /C > c:\mem.chkthen the WinBatch script could read the mem.chk file and decide what to do.
OR running it from WinBatch
RunWait("command.com","/c mem /c > c:\mem.chk")and read that file instead. But again, it will not be your real dos memory, just an emulation.
However, under NT, the number is always 0. Suggestions? Thanks.
Req# Return value 0 Total available memory, in bytes 1 Theoretical maximum available memory, in bytes 2 Percent of free system resources (lower of GDI and USER) 3 Percent of free GDI resources 4 Percent of free USER resources
Req# Return value 10 returns a number between 0 and 100 giving a general idea of current memory utilization, in which 0 indicates no memory use and 100 indicates full memory use. 11 total number of bytes of physical memory. 12 number of bytes of physical memory available. 13 total number of bytes that can be stored in the paging file. Note that this number does not represent the actual physical size of the paging file on disk. 14 number of bytes available in the paging file. 15 total number of bytes that can be described in the user mode portion of the virtual address space of the calling process. 16 number of bytes of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process.
Article ID: W13437
Filename: WinResources and Physical Memory.txt
File Created: 2001:01:26:14:48:34
Last Updated: 2001:01:26:14:48:34