如题,比如我在计算机管理的磁盘管理中给一个动态磁盘新加一个卷,我怎么编程获取我给这个卷分配的空间以及这个卷已经用了(或还剩下)多少空间呢?
MFC有现成的函数提供吗,我只找到GetVolumeInformation(),能得到卷标而已,与之相关的一些函数里好象也没有获取空间的啊。
高手帮忙拉,谢谢!
MFC有现成的函数提供吗,我只找到GetVolumeInformation(),能得到卷标而已,与之相关的一些函数里好象也没有获取空间的啊。
高手帮忙拉,谢谢!
解决方案 »
- 利用bcg添加工具栏,无法显示
- 请问 如何向一个ListControl追加CImageList
- DLL中 CFile类的声明
- ADO中奇怪的问题!
- 帮我看看:编译错误,无法定位错误...
- cannot find the implementation file of class "***". continue creating the ClassWizard database?
- 版务贴:斑竹报道/请假贴(2005-9-13)
- 在进行串口发送数据时,错误代码997 重叠 I/O 操作在进行中,如何解决??急!!!!!!
- 进来看看吧,“不是普通的”只运行一次程序。。。。
- 如何检测到某设备的驱动已安装过了
- 在得到了一个窗口的句柄后,怎样动态改变它的透明度啊????????????????????????????????????
- 解答那我一下 我就在大学学习一点C语言 学习VC呢?还是学习C#?C#的前景需求的多吗相对VC来说是不是简单了许多,C#主要开发什么程序?学习
LPCTSTR lpRootPathName,
LPDWORD lpSectorsPerCluster,
LPDWORD lpBytesPerSector,
LPDWORD lpNumberOfFreeClusters,
LPDWORD lpTotalNumberOfClusters
);
LPCTSTR lpDirectoryName, // pointer to the directory name
PULARGE_INTEGER lpFreeBytesAvailableToCaller, // receives the number of bytes on
// disk available to the caller
PULARGE_INTEGER lpTotalNumberOfBytes, // receives the number of bytes on disk
PULARGE_INTEGER lpTotalNumberOfFreeBytes // receives the free bytes on disk
);
LPCTSTR lpRootPathName, // pointer to root path
LPDWORD lpSectorsPerCluster, // pointer to sectors per cluster
LPDWORD lpBytesPerSector, // pointer to bytes per sector
LPDWORD lpNumberOfFreeClusters,
// pointer to number of free clusters
LPDWORD lpTotalNumberOfClusters
// pointer to total number of clusters
);
Parameters
lpRootPathName
Pointer to a null-terminated string that specifies the root directory of the disk to return information about. If lpRootPathName is NULL, the function uses the root of the current directory. If this parameter is a UNC name, you must follow it with an additional backslash. For example, you would specify \\MyServer\MyShare as \\MyServer\MyShare\.
Windows 95: The initial release of Windows 95 does not support UNC paths for the lpszRootPathName parameter. To query the free disk space using a UNC path, temporarily map the UNC path to a drive letter, query the free disk space on the drive, then remove the temporary mapping. Windows 95 OSR2 and later: UNC paths are supported. lpSectorsPerCluster
Pointer to a variable for the number of sectors per cluster.
lpBytesPerSector
Pointer to a variable for the number of bytes per sector.
lpNumberOfFreeClusters
Pointer to a variable for the total number of free clusters on the disk that are available to the user associated with the calling thread.
Windows NT 5.0 and later: If per-user disk quotas are in use, this value may be less than the total number of free clusters on the disk. lpTotalNumberOfClusters
Pointer to a variable for the total number of clusters on the disk that are available to the user associated with the calling thread.
Windows NT 5.0 and later: If per-user disk quotas are in use, this value may be less than the total number of clusters on the disk. Return Values
If the function succeeds, the return value is nonzero.