Reputation: 221
I download files from the Internet using InternetOpenUrl and InternetReadFile. How do I get the size of a file prior to downloading? When downloading manually from the Internet, you can see total size just as the download process begins, but how do I get that size?
Upvotes: 2
Views: 1040
Reputation: 3203
According to MSDN you should use HttpQueryInfo
to get the size of a resource accessed with InternetOpenUrl
. The corresponding query flag is called HTTP_QUERY_CONTENT_LENGTH
.
Upvotes: 4