How to download a file from URL without using curl or libcurl ..in c++.?
-
Hi, I want to download file from a given URL. I am using URLDownloadToFile() function for this purpose, but I am not getting the actual file. When I try to run the file, it throws an error. As an example, If I download MSVS 2010 service pack 1 from Microsoft's website, the file size will be 795KB. But if I download using URLDownloadToFile() function passing the url and file name, downloaded file size will be 99 KB. Is there any method to download an exe from a URL in C++. Any help wll be appreciated. Regards, mbatra
-
Hi, I want to download file from a given URL. I am using URLDownloadToFile() function for this purpose, but I am not getting the actual file. When I try to run the file, it throws an error. As an example, If I download MSVS 2010 service pack 1 from Microsoft's website, the file size will be 795KB. But if I download using URLDownloadToFile() function passing the url and file name, downloaded file size will be 99 KB. Is there any method to download an exe from a URL in C++. Any help wll be appreciated. Regards, mbatra
Which URL? You must pass the complete URL to the file. When browsing MS for downloads, they are often provided by a confirmation page that will start the download. If you pass that URL, wou will download the web page content. On such pages you will usually find a link to the real file if the download does not start after some time.
-
Hi, I want to download file from a given URL. I am using URLDownloadToFile() function for this purpose, but I am not getting the actual file. When I try to run the file, it throws an error. As an example, If I download MSVS 2010 service pack 1 from Microsoft's website, the file size will be 795KB. But if I download using URLDownloadToFile() function passing the url and file name, downloaded file size will be 99 KB. Is there any method to download an exe from a URL in C++. Any help wll be appreciated. Regards, mbatra
mbatra31 wrote:
I want to download file from a given URL. I am using URLDownloadToFile() function...
How is it being used?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Which URL? You must pass the complete URL to the file. When browsing MS for downloads, they are often provided by a confirmation page that will start the download. If you pass that URL, wou will download the web page content. On such pages you will usually find a link to the real file if the download does not start after some time.