Article View: borland.public.cppbuilder.internet.web
Article #452Re: downloading with wininet
From: Boba
Date: Tue, 02 Jan 2007 19:29
Date: Tue, 02 Jan 2007 19:29
28 lines
2211 bytes
2211 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:459aac49$1@newsgroups.borland.com... > ... > Considering that none of your code is doing any error handling, you > did not specify the contents of the values you are passing, and you > did not specify on which line the failure is actually occuring, there > is no way to diagnose your problem. You need to provide more > information. the error checking has been stripped off to simplify the post. there is no code line where it fails: it is the result of downloading that is sometimes wrong. at random, the file i get is the 406 error message (none of the code lines report a failure). some servers never send 406; others - like the one in my sample - do it at no obvious reason for that. let say i call the function 5 times in a raw on the same file and 2 times i may get a 406.html file instead. > Your looping code is wrong anyway. You are not using the value that > InternetQueryDataAvailable() returns. You must read everything that > InternetQueryDataAvailable() reports, or else it cannot report more > data later. i do read everything (not shown for the sake of simplicity). > However, I strongly suggest you use HttpQueryInfo() instead of > InternetQueryDataAvailable(). i will try it shortly.
Technical Details
Message-ID:
<459ab27c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4599f9c5@newsgroups.borland.com> <459a2c13$1@newsgroups.borland.com> <459a89d6@newsgroups.borland.com> <459aac49$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,66a46201c905b896 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Boba" <Boba@somewhere.world> Newsgroups: borland.public.cppbuilder.internet.web References: <4599f9c5@newsgroups.borland.com> <459a2c13$1@newsgroups.borland.com> <459a89d6@newsgroups.borland.com> <459aac49$1@newsgroups.borland.com> Subject: Re: downloading with wininet Date: Tue, 2 Jan 2007 13:29:50 -0600 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 65.243.37.30 Message-ID: <459ab27c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1167766140 65.243.37.30 (2 Jan 2007 11:29:00 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail