Title: Get Free Disk Space
Question: To retrieve the free disk space for disks larger than 2gb (available from Windows 95 OSR2 and Windows 98), you must use GetDiskFreeSpaceEx.
Answer:
To retrieve the free disk space for disks larger than 2gb (available from Windows 95 OSR2 and Windows 98), you must use GetDiskFreeSpaceEx.
This small example shows how:
var
FreeBytesAvailableToCaller : TLargeInteger;
FreeSize : TLargeInteger;
TotalSize : TLargeInteger;
begin
GetDiskFreeSpaceEx( 'c:',
FreeBytesAvailableToCaller,
Totalsize,
@FreeSize );
end;
The resulting values are in bytes.