One more tip:

_stat64 uses FindFirstFile/FindClose inside (just looked into the source code of
_stat64 for Visual Studio). So, if your application is designed for Windows paltform then using FindFirstFile/FindClose directly will be a little bit faster than calling to _stat64