GlobalMemoryStatusEx系统内存信息
来源:互联网 发布:oracle数据库培训班 编辑:程序博客网 时间:2024/05/22 16:55
BOOL WINAPI GlobalMemoryStatusEx(
__inout LPMEMORYSTATUSEX lpBuffer
);
示例代码:
void CTestDlg::GetMemoryInfo()
{
MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx(&statex);
CString strInfo = "内存:\r\n";
CString strTemp = "";
// 内存使用率
strTemp.Format("There is %ld percent of memory in use.\r\n", statex.dwMemoryLoad);
strInfo += strTemp;
// 物理内存
strTemp.Format("There are %I64d total Kbytes of physical memory.\r\n", statex.ullTotalPhys/1024);
strInfo += strTemp;
// 可用物理内存
strTemp.Format("There are %I64d free Kbytes of physical memory.\r\n", statex.ullAvailPhys/1024);
strInfo += strTemp;
// 认可用量:总数
strTemp.Format("There are %I64d total Kbytes of paging file.\r\n", statex.ullTotalPageFile/1024);
strInfo += strTemp;
// 认可用量:未用
strTemp.Format("There are %I64d free Kbytes of paging file.\r\n", statex.ullAvailPageFile/1024);
strInfo += strTemp;
// 虚拟内存
strTemp.Format("There are %I64d total Kbytes of virtual memory.\r\n", statex.ullTotalVirtual/1024);
strInfo += strTemp;
// 可用虚拟内存
strTemp.Format("There are %I64d free Kbytes of virtual memory.\r\n", statex.ullAvailVirtual/1024);
strInfo += strTemp;
// ullAvailExtendedVirtual保留字段
strTemp.Format("There are %I64d free Kbytes of extended memory.\r\n", statex.ullAvailExtendedVirtual/1024);
strInfo += strTemp;
m_staticMemory.SetWindowText(strInfo);
}
运行结果:
- GlobalMemoryStatusEx系统内存信息
- GlobalMemoryStatusEx系统内存信息
- 获取内存使用信息(GlobalMemoryStatusEx)
- windows程序设计 win32 API 获取系统内存信息 GlobalMemoryStatus 和 GlobalMemoryStatusEx
- windows程序设计 win32 API 获取系统内存信息 GlobalMemoryStatus 和 GlobalMemoryStatusEx
- 查看系统内存信息
- 《Windows核心编程》---获得内存的当前状态のGlobalMemoryStatusEx
- linux 系统查看内存信息
- Windows系统内存信息查看
- VB 获取系统内存信息
- linux 系统信息查询——系统版本,内核信息,cpu信息,内存信息,硬盘信息
- Android系统内存优化之二(系统内存信息)
- GlobalMemoryStatusEx详解
- GlobalMemoryStatusEx函数
- GlobalMemoryStatusEx函数
- python获取系统信息(系统版本,CPU信息,内存信息,硬盘信息)
- WIN API-VFP获取系统内存信息
- 获取系统CPU和内存信息
- 最长公共子序列
- Difference Between Prefetch Abort and Data Abort
- linux下用gridsql做postgresql集群
- 3ds模型在OpenGL中的读取和重绘
- JS+Jquery
- GlobalMemoryStatusEx系统内存信息
- 开发管理 CheckLists(11) -敏捷开发-搜集故事
- VS2012中lightswitch新功能介绍(beta)
- c++ 日志类 CCLog(更新)
- J2ME按键处理机制
- 关于Lua调用c++ DLL 文件的详解
- R Graphics Basics: Plot area, mar (margins),oma (outer margin area),mfrow, mfcol (multiple figures)
- 使用Myeclipse 8.5开发基于JAX-WS的Web service实例
- Linux shell命令之wc和grep