SHGetDiskFreeSpaceSHGetDiskFreeSpace*
*Contents  *Index  *Topic Contents
*Previous Topic: SHGetDesktopFolder
*Next Topic: SHGetFileInfo

SHGetDiskFreeSpace


BOOL SHGetDiskFreeSpace(
    LPCTSTR pszVolume,
    ULARGE_INTEGER *pqwFreeCaller,
    ULARGE_INTEGER *pqwTot,
    ULARGE_INTEGER *pqwFree
);

Retrieves disk space information for a disk volume.

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

SHGetDiskFreeSpace is nearly identical to the GetDiskFreeSpaceEx API. SHGetDiskFreeSpace will load the proper module, obtain the address of GetDiskFreeSpaceEx and then call it. This prevents the caller from having to perform these operations themselves. See the operating system restrictions for GetDiskFreeSpaceEx for more information.

This function is implemented in shell versions 4.71 and later. In order to maintain backward compatibility with previous shell versions, this function should not be used explicitly. Instead, the LoadLibrary and GetProcAddress functions should be used to obtain the function address.

Version 4.71


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.