Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Code to download a remote file from a valid URL using URLDownloadCacheFile function.

0.00/5 (No votes)
18 Oct 2001 1  
You can use this code to download a remote file from a valid URL using URLDownloadCacheFile function.

Introduction

You can use this code to download a remote file from a valid URL using URLDownloadCacheFile function. The demo shows that get a .gif file and load it into memory (i get it's BITMAP struct). URLDownloadCacheFile function download a file from a URL and save the file in IE temp folder, so when you use CreateFile function,you must use FILE_FLAG_RANDOM_ACCESS flag,otherwise you will failed to createfile. You can also use URLDownloadFile to get a remote file,if you use this function,you need not care about the flag about the CreateFile function. Another good way to get remote file is socked,it can control the process,so cool! If you have intersting in socked,try it!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here