A: 

I think the problem is your use of filesize.QuadPart. Try removing that from both the format string and the argument list, and see if it works.

If that helps, then look up the correct format string to use for a 64-bit quantity in printf().

Greg Hewgill
sorry i tried to cut down to only relavent code, there is nothing wrong with that part, LARGE_INTEGER filesize;filesize.LowPart = finfo.nFileSizeLow;filesize.HighPart = finfo.nFileSizeHigh;The filesize gets reported correctly.
Myforwik
Okay, please try changing filesize.QuadPart to filesize.LowPart in your printf statement and see if that helps.
Greg Hewgill
Replace %lld with %d if you switch to filesize.LowPart.
Michael
@Michael: %lld does not indicate a 64 bit quantity in the MS implementation of printf. I believe that is the root cause of the original problem.
Greg Hewgill
Thanks in my compiler i had to use %I64u instead of %llu.
Myforwik