It will better to know the size of file before downloading. I know that they say about two solutions of this task. The first is to calculate size with the help of CStdioFile::SeekToEnd(). The second is to use CHttpFile::QueryInfo.
But in some cases (I mean in some servers) it doesn't work. Do you know any methods else.