Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2007 Dec : FtpGetFileSize() returns incorrect size for files over 4 gig

www.cryer.info
Managed Newsgroup Archive

FtpGetFileSize() returns incorrect size for files over 4 gig

Subject:FtpGetFileSize() returns incorrect size for files over 4 gig
Posted by:"SuperBK" (bkowa..@gmail.com)
Date:Mon, 3 Dec 2007 09:39:22 -0800 (PST)

I have searched and only found one mention of this. I find it amazing
that such a blatant bug could still exist. When I use Wininet's
FtpGetFileSize() the size returned is incorrect for a file larger than
4.2 Gig.  My file is   (7,119,037,160 bytes), FtpGetFileSize() returns
4294967295 for the low size and 0 for the high size. Also,
FtpFindFirstFile() doesn't return the correct size either.

The data back from the ftp server, as seen in the ftp command line
client looks like this:
213 7119037160
which is the exact size of my file.

Is there any workaround? Use an ftp client that doesn't use Wininet?

Thanks,
Brian

Replies:

www.cryer.info
Managed Newsgroup Archive