获取系统的各个分区
来源:互联网 发布:澳洲阳光海岸大学 知乎 编辑:程序博客网 时间:2024/06/13 10:59
获取系统的分区情况;
TCHAR buf[100];
DWORD len = GetLogicalDriveStringsW(sizeof(buf),buf);
CString message;
for(TCHAR* s=buf ; *s ; s+=_tcslen(s)+1)
{
LPCTSTR nDeviceinfo = s;
UINT uDriveType = GetDriveType(nDeviceinfo);
if (uDriveType & DRIVE_FIXED) {
ULARGE_INTEGER FreeAv,TotalBytes,FreeBytes;
if(GetDiskFreeSpaceEx(nDeviceinfo,&FreeAv,&TotalBytes,&FreeBytes))
{
//格式化信息,并显示出来
CString strTotalBytes,strFreeBytes;
//strTotalBytes.Format(_T("%uMB"),TotalBytes.QuadPart/1024/1024);
//strFreeBytes.Format(_T("%uMB"),FreeBytes.QuadPart/1024/1024);
/*int nItem=m_listDisk.InsertItem(0,L"0");*/
m_combo_record_dir.InsertString(m_combo_record_dir.GetCount(),nDeviceinfo);
//m_listDisk.SetItemText(nItem,1,strFreeBytes);
//m_listDisk.SetItemText(nItem,2,strTotalBytes);
}
}
}
- 获取系统的各个分区
- ubuntu系统各个分区的作用
- IOS获取系统文件的各个目录的方法
- 获取各个数量级系统时间
- Android 获取系统各个目录
- 获取系统分区的三种方式(一)
- Firefox各个系统的各个版本
- 获取字节的各个bit
- Linux的系统分区
- Linux系统的分区
- 黑马程序员——获取系统时间的各个版本的写法
- 各个系统的宏定义
- FAQ200412:获取系统有几个逻辑分区
- 获取系统有几个逻辑分区
- Python获取系统分区盘符
- 检查sqlserver服务器的各个分区的剩余空间
- 利用Truncate清空Oracle各个分区的资料
- 查询分区表中各个分区的记录条数
- C++ Vector fwrite 与 fread
- TinyXml 创建文档
- C语言API读写文件
- Android ActionBar完全解析,使用官方推荐的最佳导航栏(上)
- windows 枚举进程,并结束进程
- 获取系统的各个分区
- C语言文件操作 函数大全
- Swift学习笔记之-Implicitly unwrapped optionals
- 【转载】boost中的timer们
- 【转载】Boost.Regex 使用
- 【转载】[转载]GetCurrentProcessID、OpenProcessToken、LookupPrivilegeValue、AdjustTokenPrivileges
- 关闭进程时的权限问题,一个例子。
- ubuntu mount windos share目录,遇到mount error(12): Cannot allocate memory
- 关于qt.