Maybe a trivial question but I need to know this for sure once and for always. (so no trivial answers please)
I always see examples of reading a file's data by calling CFile::Read (or its Win32 equivalent or whatever equivalent) until there's no more data to read (the number of bytes read is less than the requested number of bytes). What's the reason for doing this?
Isn't it safe to just call CFile::GetLength and then CFile::Read with the requested length of the file?