title: What's the difference between struct __stat64 and struct _stati64 on WIN32?
body: <p>I'm working on some code that needs to run on every version of windows since WIN2000 and also needs to work with wide file paths.</p>
  
  <p>I need to call some variant of <code>stat</code> to get the file length. The file may be larger than 4GB.</p>
  
  <p>Here's the relevant section from the MSDN Visual Studio .NET 2003[1] documentation:</p>
  
  <pre>
  
  int _stat(
     const char *path,
     struct _stat *buffer 
  );
  int _stat64(
     const char *path,
     struct __stat64 *buffer 
  );
  int _stati64(
     const char *path,
     struct _stati64 *buffer 
  );
  int _wstat(
     const wchar_t *path,
     struct _stat *buffer 
  );
  int _wstat64(
     const wchar_t *path,
     struct __stat64 *buffer 
  );
  int _wstati64(
     const wchar_t *path,
     struct _stati64 *buffer 
  );
  </pre>
  
  <p>[1] <a href="http://msdn.microsoft.com/en-us/library/14h5k7ff(v=VS.71).aspx">http://msdn.microsoft.com/en-us/library/14h5k7ff(v=VS.71).aspx</a></p>
  
  <p>I can't figure out the difference between the <code>__stat64</code> structure and the <code>_stati64</code> structure. I know that I want to use <code>_wstat64</code> or <code>_wstati64</code> but MSDN is silent on which is <strong>better</strong>.</p>
  
  <p>Any suggestions?</p>