Message board for the users of flat assembler.
> Windows > http how to get file size
HarryTuttle 18 Oct 2004, 13:03
I usually got a file from www by calling '3 API functions
3: InternetReadFile or ReadFIle(but this one has one parametr more than InternetReadFile)
How to get the size of a remote file.
In oposite to Ftp which has FtpGetFileSize I have no idea what to do with www servers.
How do you know how many bytes the file is long?
P.S. the bigger parametr as a 3th in InternetReadFile gets a bad result.
Microsoft: brings power of yesterday to computers of today.
|18 Oct 2004, 13:03||
inskipp 18 Oct 2004, 16:43
You can try the old trick from DOS:
and the return value will be file size
(or -1). Don't forget to set pointer back to FILE_BEGIN if you want to dowload file.
I think you can also use the HttpQueryInfo function, but this will be harder.
|18 Oct 2004, 16:43||
gorshing 18 Oct 2004, 21:14
Or you could read the RFC and pull the size out of the HTTP Response.
Which I believe is .... http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
|18 Oct 2004, 21:14||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.