Cameron Fitzhugh
2006-10-14 00:38:24 UTC
I have a large download so I wanted to download it in pieces. After
InternetOpenUrl on an FTP site (ftp://ftp.xxx.xxx/...) I tried to restart
downloading where my last session ended, but InternetSetFilePointer gave a
return code of -1, and then GetLastError returned 0 (zero). A subsequent
InternetReadFile begins at the beginning of the remote file.
Am I using the wrong method to restart a download? There's lots of
shareware out there that says it can restart downloads, so presumably it is
possible.
I tried this same program on an HTTP site, again InternetSetFilePointer gave
a return code of -1, but in this case, GetLastError returned 12016,
ERROR_INTERNET_INVALID_OPERATION.
So, can you help me with restarting downloads in a C++ program? I'm on XP,
up to date with all high-priority updates.
Thanks,
Cameron
InternetOpenUrl on an FTP site (ftp://ftp.xxx.xxx/...) I tried to restart
downloading where my last session ended, but InternetSetFilePointer gave a
return code of -1, and then GetLastError returned 0 (zero). A subsequent
InternetReadFile begins at the beginning of the remote file.
Am I using the wrong method to restart a download? There's lots of
shareware out there that says it can restart downloads, so presumably it is
possible.
I tried this same program on an HTTP site, again InternetSetFilePointer gave
a return code of -1, but in this case, GetLastError returned 12016,
ERROR_INTERNET_INVALID_OPERATION.
So, can you help me with restarting downloads in a C++ program? I'm on XP,
up to date with all high-priority updates.
Thanks,
Cameron