GetDiskSpace
This function is obsolete. Use the GetDiskInfo function instead.
The GetDiskSpace function returns the amount of free space—in bytes—on the drive or path specified in szPath.
Syntax
GetDiskSpace ( szDrive );
Parameters
Parameter |
Description |
szPath |
Specifies the path for which the function returns the amount of space available. The value specified can be a UNC path. |
Return Values
Return Value |
Description |
> 0 |
The number of bytes free in the specified directory. The maximum value returned is 2 GB. Free disk space greater than that returns as 2 GB. Call GetDiskSpaceEx when your setup needs to check for free space greater than 2 GB. |
< 0 |
Indicates that GetDiskSpace was unable to obtain the amount of free space. |