НН
TCHAR* szLogicalDrives = new TCHAR[sz];
GetLogicalDriveStrings(sz, szLogicalDrives);
string all;
while (*szLogicalDrives)
{
TCHAR szDisk[80];
lstrcpy(szDisk, szLogicalDrives);
GetDriveType(szDisk);
UINT uDriveType = GetDriveType(szDisk);
if (uDriveType == DRIVE_FIXED)
{
string uliof, frof;
__int64 uliTotalBytes;
GetDiskFreeSpaceEx(szDisk, NULL, (PULARGE_INTEGER)&uliTotalBytes, NULL);
__int64 free;
GetDiskFreeSpaceEx(szDisk, (PULARGE_INTEGER)&free, NULL, NULL);
uliTotalBytes = uliTotalBytes / (1024 * 1024 * 1024);
free = free / (1024 * 1024 * 1024);
uliof = to_string(uliTotalBytes);
frof = to_string(free);
wstring ws(szDisk);
string str_sizw(ws.begin(), ws.end());
str_sizw.erase(2, 1);
all += str_sizw + " " + uliof + "/" + frof + "</br> ";
}
while (*szLogicalDrives) szLogicalDrives++;
szLogicalDrives++;
}