GetDiskFreeSpaceEx (Windows CE 5.0)

Send Feedback

This function obtains the following information about the amount of space available on a disk volume: the total amount of space, the total amount of free space, and the amount of free space available to the user associated with the calling thread.

BOOLGetDiskFreeSpaceEx( 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 specified disk. This string can be a Universal Naming Convention (UNC) name.

    If lpDirectoryName is NULL, the GetDiskFreeSpaceEx function obtains information about the object store.

    Note   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

The values obtained by this function are of type ULARGE_INTEGER. Be sure not to truncate these values to 32 bits.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.