GlobalMemoryStatusEx系统内存信息
来源:互联网 发布:淘宝图片库 编辑:程序博客网 时间:2024/05/22 16:42
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和内存信息
- python 利用lxml 解析xml文件
- 鼠标右键菜单
- 解决easyui中datagrid列太多 无数据不显示滚动条的bug
- SQL Server还原备份经典文档
- 管理员以标准用户权限运行时
- GlobalMemoryStatusEx系统内存信息
- Kanade-Lucas-Tomasi(KLT)进行目标跟踪
- 信息指纹
- VC项目调试基础
- 用mysql触发器自动更新memcache
- GetSystemInfo系统信息
- 硅谷创业教父Paul Graham:如何获得创业idea (1)
- x86平台下 Android 系统的 Linux 部分的重启分析
- SQL Server使用bcp导入导出