- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
DWORD GetDriveSpaceMB(char* drive)
{
DWORD nsc, nbs, nfc, ncu;
double FreeB;
DWORD FreeM;
string diskname = format_x("%s:\\",drive);
GetDiskFreeSpace((char*)diskname.c_str(), &nsc, &nbs, &nfc, &ncu );
FreeB = (double) nfc * (double) nsc * (double) nbs;
FreeM = FreeB / 1024.0 / 1024;
return FreeM;
}