GetDiskFreeSpaceEx
This 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.
BOOL GetDiskFreeSpaceEx(
LPCWSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes );
Parameters
lpDirectoryName
[in] 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 object store.
Note that lpDirectoryName does not have to specify the root directory on a disk. The function accepts any directory on the disk.
lpFreeBytesAvailableToCaller
[out] 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.lpTotalNumberOfBytes
[out] Pointer to a variable to receive the total number of bytes on the disk that are available to the user associated with the calling thread.lpTotalNumberOfFreeBytes
[out] Pointer to a variable to receive the total number of free bytes on the disk.This parameter can be NULL.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
Note that the values obtained by this function are of type ULARGE_INTEGER. Be careful not to truncate these values to 32 bits.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Winbase.h | Coredll.lib, Fsmain.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.