please dont rip this site Prev Next

GetDiskFreeSpace info  Overview  Group

The GetDiskFreeSpace function retrieves information about the specified disk, including the amount of free space on the disk.

This function has been superseded by the GetDiskFreeSpaceEx function. New applications should use GetDiskFreeSpaceEx.

BOOL GetDiskFreeSpace(

    LPCTSTR lpRootPathName,

// address of root path

    LPDWORD lpSectorsPerCluster,

// address of sectors per cluster

    LPDWORD lpBytesPerSector,

// address of bytes per sector

    LPDWORD lpNumberOfFreeClusters,

// address of number of free clusters

    LPDWORD lpTotalNumberOfClusters 

// address of total number of clusters

   );

Parameters

lpRootPathName
Points to a null-terminated string that specifies the root directory of the disk to return information about. If lpRootPathName is NULL, the function uses the root of the current directory. If this parameter is a UNC name, you must follow it with an additional backslash. For example, you would specify \\MyServer\MyShare as \\MyServer\MyShare\.
lpSectorsPerCluster
Points to a variable for the number of sectors per cluster.
lpBytesPerSector
Points to a variable for the number of bytes per sector.
lpNumberOfFreeClusters
Points to a variable for the total number of free clusters on the disk.
lpTotalNumberOfClusters
Points to a variable for the total number of clusters on the disk.

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.

Remarks

The GetDiskFreeSpaceEx function lets you avoid the arithmetic required by the GetDiskFreeSpace function.

Windows 95: 
The GetDiskFreeSpace function returns incorrect values for volumes that are larger than 2 gigabytes. The function caps the values stored into *lpNumberOfFreeClusters and *lpTotalNumberOfClusters so as to never report volume sizes that are greater than 2 gigabytes.

Even on volumes that are smaller than 2 gigabytes, the values stored into *lpSectorsPerCluster, *lpNumberOfFreeClusters, and *lpTotalNumberOfClusters values may be incorrect. That is because the operating system manipulates the values so that computations with them yield the correct volume size.

Windows 95 OSR 2: The GetDiskFreeSpaceEx function is available on Windows 95 systems beginning with OEM Service Release 2 (OSR 2). The GetDiskFreeSpaceEx function returns correct values for all volumes, including those that are greater than 2 gigabytes.

See Also

GetDiskFreeSpaceEx, GetDriveType

See:


file: /Techref/os/win/api/win32/func/src/f30_15.htm, 4KB, , updated: 2001/6/26 09:44, local time: 2024/11/27 06:59,
TOP NEW HELP FIND: 
3.142.136.210:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/os/win/api/win32/func/src/f30_15.htm"> GetDiskFreeSpace</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .