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 10:44, local time: 2024/8/31 19:04,
3.142.134.166: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://piclist.com/techref/os/win/api/win32/func/src/f30_15.htm"> GetDiskFreeSpace</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to piclist.com! |
.