I think what you are looking for should be
_fseeki64(), not
_fseek64(). As a little extra challenge for us, Linux/glibc calls this
fseeko64()
Also, any reason you prefer determining the file size using the
_fseeki64() plus
_ftelli64() "workaround" rather than calling
_fstati64() right away?
EDIT: I just noticed that the MSVC CRT even has a
_filelengthi64() function, available in VC 6.0, which makes it even simpler
Code:
#include <io.h>
__int64 getFileSize64(FILE *const fp)
{
return _filelengthi64(_fileno(fp));
}