请问大侠,有没有api能够知道硬盘是否已经被格式化过?在线等待!急!
解决方案 »
- xp,win7 分别是什么操作系统?都是抢占式?
- 右移8位 与0xFF做与操作的问题
- 47068833 超级学习群(最多500人)欢迎新老程序员热情之牛人加入!!!
- 请教:如何修改CTreeCtrl的背景色,使其相邻两个节点的背景色不同,便于区分,谢谢!
- 问大家一个关于DLL文件加载的问题,急
- 简单的数据传输问题,求助
- 高分求救!八皇后问题 [在线等待]
- 求一份服务器适时检测客户端的程序用udp
- 怎么在线程中使用excel?线程中使用sendmessage ?线程的参数传递?
- 怎样将字符串"9BF"转化为0x09bf(两字节)
- 求 Visual C++ MFC 扩展编程实例 源代码
- 我初学VC,请问怎样调用OnCreateClient函数,请大家帮帮小妹呀!
BOOL GetDiskFreeSpace(
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.
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
);
Parameters
lpDirectoryName
Pointer to a null-terminated string that specifies a directory on the disk of interest. This string can be a UNC name. 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\.
If lpDirectoryName is NULL, the GetDiskFreeSpaceEx function obtains information about the disk that contains the current directory. Note that lpDirectoryName does not have to specify the root directory on a disk. The function accepts any directory on the disk. lpFreeBytesAvailableToCaller
Pointer to a variable to receive the total number of free bytes on the disk that are available to the user associated with the calling thread.
Windows NT 5.0 and later: If per-user quotas are in use, this value may be less than the total number of free bytes on the disk. lpTotalNumberOfBytes
Pointer to a variable to receive the total number of bytes on the disk that are available to the user associated with the calling thread.
Windows NT 5.0 and later: If per-user quotas are in use, this value may be less than the total number of bytes on the disk. lpTotalNumberOfFreeBytes
Pointer to a variable to receive the total number of free bytes on the disk.
This parameter can be NULL.