Deli
2005-04-23 14:26:50 UTC
Hi,
I know that this group is about VB, but I can't find any group about winapi
only (or C winapi).
I use GetDiskFreeSpaceEx function to retrieve the info about disk space.
I have problem with TotalNumberOfBytes argument, because for larger
partitions the returned value is approximately 2 times bigger than the real
size.
Here's the code:
TCHAR buf[30] ;
ULARGE_INTEGER FreeBytesAvailable, TotalNumberOfBytes,
TotalNumberOfFreeBytes ;
GetDiskFreeSpaceEx(buf, &FreeBytesAvailable, &TotalNumberOfBytes,
&TotalNumberOfFreeBytes) ;
wsprintf(buf, "%u%u", TotalNumberOfBytes.HighPart,
TotalNumberOfBytes.LowPart) ;
Thanks for any help.
I know that this group is about VB, but I can't find any group about winapi
only (or C winapi).
I use GetDiskFreeSpaceEx function to retrieve the info about disk space.
I have problem with TotalNumberOfBytes argument, because for larger
partitions the returned value is approximately 2 times bigger than the real
size.
Here's the code:
TCHAR buf[30] ;
ULARGE_INTEGER FreeBytesAvailable, TotalNumberOfBytes,
TotalNumberOfFreeBytes ;
GetDiskFreeSpaceEx(buf, &FreeBytesAvailable, &TotalNumberOfBytes,
&TotalNumberOfFreeBytes) ;
wsprintf(buf, "%u%u", TotalNumberOfBytes.HighPart,
TotalNumberOfBytes.LowPart) ;
Thanks for any help.