I am using this code with the asynchronous WinInet to determine the length of a file...
, HTTP_QUERY_CONTENT_LENGTH or HTTP_QUERY_FLAG_NUMBER, @pr.dwTotalLength, dwBufferLen, dwIndex) = FALSE) then pr.dwTotalLength:=0;
This is done so that I can display a progress bar whilst the file is downloading. For many sites this works fine, however for some sites I find that it always returns zero. For example...
As a result I can't display a progress bar for some sites when the download takes place because I am unable to determine the length of the file before the download starts, so it isn't possible to know how much progress has been made.
I guess it doesn't work with some sites because the length information isn't stored in the HTTP header?? Do you know of any way around this problem?
Thanks in Advance,