powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / C++ [игнор отключен] [закрыт для гостей] / Свободное место на диске удаленного компьютера
9 сообщений из 9, страница 1 из 1
Свободное место на диске удаленного компьютера
    #33443749
Фотография cap83
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Здраствуйте ВСЕ.
Подскажите как получить свободное место на диске удаленного компьютера .
Заранее благодарен .
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33443776
_Балтика
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
GetDiskFreeSpace

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

The GetDiskFreeSpace function cannot report volume sizes that are greater than 2 gigabytes (GB). To ensure that your application works with large capacity hard drives, use the GetDiskFreeSpaceEx function.


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.

If the function fails, the return value is zero. To get extended error information, call GetLastError.
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33443893
Фотография buser
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
WMI
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33447599
foo
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
foo
Гость
RPC
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33447601
foo
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
foo
Гость
RPC
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33447603
foo
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
foo
Гость
RPC
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33448624
Фотография cap83
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
А example можно , плиз ?
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33450917
Фотография buser
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
...
Рейтинг: 0 / 0
Свободное место на диске удаленного компьютера
    #33450921
Фотография buser
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Собственно это из WMI C++ Application Examples
...
Рейтинг: 0 / 0
9 сообщений из 9, страница 1 из 1
Форумы / C++ [игнор отключен] [закрыт для гостей] / Свободное место на диске удаленного компьютера
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]