To retrieve the current memory status, use the GlobalMemoryStatus() function. The TMemoryStatus contains several fields indicating the status of the memory:
.dwMemoryLoad: Total memory used in percentage (%)
.dwTotalPhys: Total physical memory in bytes.
.dwAvailPhys: Physical memory left in bytes.
.dwTotalPageFile: Total page file in bytes.
.dwAvailPageFile:Page file left in bytes.
.dwTotalVirtual: Total virtual memory in bytes.
.dwAvailVirtual: Virtual memory left in bytes.
Before presenting the memory values, convert them into giga, mega or kilobytes.
varDelphi tips navigator:
Status : TMemoryStatus;
begin
Status.dwLength := sizeof(TMemoryStatus) ;
GlobalMemoryStatus(Status) ;
ShowMessage(Format('Virtual: %d',[Status.dwTotalVirtual])) ;
end;
» Exit From Windows
« Programmatically Disable Mouse and Keyboard
Delphi tips navigator:
» Exit From Windows
« Disable mouse and keyboard

