Форум С++

 

Ответить на сообщение

Вернуться к теме

Вы отвечаете на сообщение:

Автор: Фитч   (09.11.2007 в 05:03)
Времени мало, поэтому даю копипаст из мсдн:

BOOL GetDiskFreeSpace(
  LPCTSTR lpRootPathName,
  LPDWORD lpSectorsPerCluster,
  LPDWORD lpBytesPerSector,
  LPDWORD lpNumberOfFreeClusters,
  LPDWORD lpTotalNumberOfClusters
);


Parameters
lpRootPathName
[in] Pointer to a null-terminated string that specifies the root directory of the disk for which information is to be returned. If this parameter is NULL, the function uses the root of the current disk. If this parameter is a UNC name, it must include a trailing backslash (for example, \\MyServer\MyShare\). Furthermore, a drive specification must have a trailing backslash (for example, C:\).
Windows 95: The initial release of Windows 95 does not support UNC paths. Therefore, you must temporarily map the UNC path to a drive letter, query the free disk space on the drive, then remove the temporary mapping. Windows 95 OSR2 and later support UNC paths.
lpSectorsPerCluster
[out] Pointer to a variable that receives the number of sectors per cluster.
lpBytesPerSector
[out] Pointer to a variable that receives the number of bytes per sector.
lpNumberOfFreeClusters
[out] Pointer to a variable for the total number of free clusters on the disk that are available to the user associated with the calling thread.
If per-user disk quotas are in use, this value may be less than the total number of free clusters on the disk.

lpTotalNumberOfClusters
[out] Pointer to a variable for the total number of clusters on the disk that are available to the user associated with the calling thread.
If per-user disk quotas are in use, this value may be less than the total number of clusters on the disk.

Return Values
If the function succeeds, the return value is nonzero.


Ваше имя:

Пароль:

Цитировать

Используйте тэги для выделения текста:
Код: [code][/code]
Жирный: [b][/b]
Наклонный: [i][/i]
URL: [url][/url]

Сообщение:

Прикрепить: