Could it be that in some cases the use of GetDiskFreeSpaceEx is not appropriate?
mTotalBytes = getDiskSize(driveLetter); double getDiskSize(string driveLetter) { ULARGE_INTEGER TotalBytes; string diskPath = driveLetter + ":\\"; BOOL result = GetDiskFreeSpaceEx(diskPath.c_str(), NULL, &TotalBytes, NULL); if(result == 0) return 0; return TotalBytes.QuadPart; }
The use of a max buflen of 8192 might also help.
Could it be that in some cases the use of GetDiskFreeSpaceEx is not appropriate?
mTotalBytes = getDiskSize( driveLetter) ; eEx(diskPath. c_str() , NULL, &TotalBytes, NULL); QuadPart;
double getDiskSize(string driveLetter)
{
ULARGE_INTEGER TotalBytes;
string diskPath = driveLetter + ":\\";
BOOL result = GetDiskFreeSpac
if(result == 0) return 0;
return TotalBytes.
}
The use of a max buflen of 8192 might also help.