A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



SHGetDiskFreeSpace

Retrieves disk space information for a disk volume.

VB4-32,5,6
Declare Function SHGetDiskFreeSpace Lib "shell32" Alias "SHGetDiskFreeSpaceA" (ByVal pszVolume As String, pqwFreeCaller As Currency, pqwTot As Currency, pqwFree As Currency) As Long

Operating Systems Supported
Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)

Library
Shell32

Parameter Information
- pszVolume
A NULL-terminated string that specifies the volume for which size information will be retrieved. This can be a drive letter, UNC name or the path of a folder. You cannot use NULL to represent the current drive.

- pqwFreeCaller
Address of a ULARGE_INTEGER value that receives the number of bytes available to the caller on the volume. If the operating system implements per-user quotas, this value may be less than the total number of free bytes on the volume.

- pqwTot
Address of a ULARGE_INTEGER value that receives the total size of the volume, in bytes.

- pqwFree
Address of a ULARGE_INTEGER value that receives the number of bytes of free space on the volume.

Return Values
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.

Last update: 07 April 2006