GetDiskFreeSpaceEx The GetDiskFreeSpaceEx function obtains information about the amount of space available on a disk volume: the total amount of space, the total amount of free space, and the total amount of free space available to the user associated with the calling thread. VB4-32,5,6 Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (ByVal lpRootPathName As String, lpFreeBytesAvailableToCaller As Currency, lpTotalNumberOfBytes As Currency, lpTotalNumberOfFreeBytes As Currency) As Long |
Operating Systems Supported |
Windows NT 4.0 or later; Windows 95 OSR2 or later |
· lpDirectoryName Pointer to a null-terminated string that specifies a directory on the disk of interest. This string can be a UNC name. If lpDirectoryName is NULL, the GetDiskFreeSpaceEx function obtains information about the disk that contains the currect 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. If the operating system implements per-user quotas, 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.
· lpTotalNumberOfFreeBytes Pointer to a variable to receive the total number of free bytes on the disk. This parameter can be NULL. |
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. |
|