The GetDiskFreeSpace function retrieves information about the specified disk, including the amount of free space on the disk.
This function has been superseded by the GetDiskFreeSpaceEx function. New applications should use GetDiskFreeSpaceEx.
BOOL GetDiskFreeSpace(
LPCTSTR lpRootPathName, |
// address of root path |
LPDWORD lpSectorsPerCluster, |
// address of sectors per cluster |
LPDWORD lpBytesPerSector, |
// address of bytes per sector |
LPDWORD lpNumberOfFreeClusters, |
// address of number of free clusters |
LPDWORD lpTotalNumberOfClusters |
// address of total number of clusters |
); |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The GetDiskFreeSpaceEx function lets you avoid the arithmetic required by the GetDiskFreeSpace function.
Even on volumes that are smaller than 2 gigabytes, the values stored into *lpSectorsPerCluster, *lpNumberOfFreeClusters, and *lpTotalNumberOfClusters values may be incorrect. That is because the operating system manipulates the values so that computations with them yield the correct volume size.
Windows 95 OSR 2: The GetDiskFreeSpaceEx function is available on Windows 95 systems beginning with OEM Service Release 2 (OSR 2). The GetDiskFreeSpaceEx function returns correct values for all volumes, including those that are greater than 2 gigabytes.
GetDiskFreeSpaceEx, GetDriveType
See:
file: /Techref/os/win/api/win32/func/src/f30_15.htm, 4KB, , updated: 2001/6/26 09:44, local time: 2024/11/24 08:24,
3.15.186.56:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/TECHREF/os/win/api/win32/func/src/f30_15.htm"> GetDiskFreeSpace</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.