You probably don't understand what union . File length is obtained
LARGE_INTEGER len_li; GetFileSizeEx (hFile, &len_li); int64 len = (len_li.u.HighPart << 32) | len_li.u.LowPart;
In addition, you can access the 64-bit representation directly using modern compilers:
LARGE_INTEGER len_li; GetFileSizeEx (hFile, &len_li); LONGLONG len_ll = len_li.QuadPart;
source share