我用GlobalMemoryStatus()
读到的本机的总物理内存和可用物理内存是一样的,是怎么回事呢?
还有别的办法可以读到本机内存吗?
谢谢。
------解决方案--------------------
不知道,查MSDN 吧。
------解决方案--------------------
- C/C++ code
PUBLIC Subroutine GlobalMemoryStatusEx(ref ws_memory lpBuffer) LIBRARY "kernel32.dll"type ws_memory from structure unsignedlong dlength unsignedlong dmemoryload longlong dtotalphys longlong davailphys longlong dtotalpagefile longlong davailpagefile longlong dtotalvirtual longlong davailvirtualend typews_memory str_memorystr_memory.dlength = 64GlobalMemoryStatusEx(str_memory)longlong dtotalphysdtotalphys = str_memory.dtotalphys