使用GlobalMemoryStatus获取系统内存信息(PowerBuilder代码)

SUBROUTINE GlobalMemoryStatus(ref MEMORYSTATUS lpMemorystatus) Library "kernel32.dll";

MEMORYSTATUS mem

GlobalMemoryStatus(mem);
sle_mem.text=string(mem.dwTotalPhys)
sle_dwAvailPhys.text=string(mem.dwAvailPhys)
sle_dwMemoryLoad.text=string(mem.dwMemoryLoad)+'%'
sle_dwTotalPageFile.text=string(mem.dwTotalPageFile)
sle_dwavailpagefile.text=string(mem.dwavailpagefile)
sle_dwtotalvirtual.text=string(mem.dwtotalvirtual)
sle_dwavailvirtual.text=string(mem.dwavailvirtual)

你可能感兴趣的:(PowerBuilder)