Hi, did a quick check on my system and it works fine. Since you didn't post any code, I have no idea why you got a datatype misalignment.
TCHAR buff[200];
ULARGE_INTEGER lFreeCaller, lTotBytes , lTotFreeBytes ;
::GetDiskFreeSpaceEx (NULL, &lFreeCaller, &lTotBytes, &lTotFreeBytes);
swprintf(buff, _T("%u mb free for caller, %u total mbytes, %u total free mbytes"),
lFreeCaller.QuadPart >> 20 , lTotBytes.QuadPart >> 20, lTotFreeBytes.QuadPart>> 20 );
MessageBox(0, buff, _T("Info"), 0);
unsigned __int64 test1 = lFreeCaller.QuadPart;
unsigned __int64 test2 = lTotBytes.QuadPart;
unsigned __int64 test3 = lTotFreeBytes.QuadPart;
int mb1 = (test1 >> 20);
int mb2 = (test2 >> 20);
int mb3 = (test3 >> 20);
swprintf(buff, _T("%u mb free for caller, %u total mbytes, %u total free mbytes"), mb1, mb2, mb3);
MessageBox(0, buff, _T("Info"), 0);
Not sure why the first messagebox reports 0 MB and the second shows 15 MB for Total number of bytes, but Im sure you can investigate that further if you're interested in that value. HTH “Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002