Code:
INT64 i64FreeBytesToCaller = 0, i64TotalBytes = 0, i64FreeBytes = 0;
if (GetDiskFreeSpaceEx (NULL, (PULARGE_INTEGER)&i64FreeBytesToCaller,
(PULARGE_INTEGER)&i64TotalBytes,
(PULARGE_INTEGER)&i64FreeBytes))
{
printf ("Free space: %u GB", i64FreeBytes/1024/1024/1024);
printf ("Capacity: %u GB", i64TotalBytes/1024/1024/1024);
}
This code is working now except that instead of a whole drive capacity I only get the partition capacity. Any ideas how to get the whole drive capacity with this function?