View Single Post
Old 21st November 2014, 00:28   #2  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
This also works for files > 4GB:

Code:
WIN32_FIND_DATA fd;
unsigned __int64 iSize = 0;
char szFind[MAX_PATH];
...
//copy file name to szFind
...
HANDLE hFind = FindFirstFile(szFind, &fd); 

if (hFind != INVALID_HANDLE_VALUE)
 iSize = (((unsigned __int64)fd.nFileSizeHigh) << 32) + (unsigned __int64)fd.nFileSizeLow;

FindClose(hFind);
As for seeking, writing and reading large files I suggest you search google. I don't think that the good old fseek can handle it.

Last edited by Groucho2004; 21st November 2014 at 00:38.
Groucho2004 is offline   Reply With Quote