Click here to Skip to main content
15,878,748 members
Articles / Programming Languages / C++
Article

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

Rate me:
Please Sign up or sign in to vote.
1.38/5 (4 votes)
18 Oct 2001 105K   2K   18   7
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


Written By
Web Developer
China China
I love program!

Comments and Discussions

 
General[Message Deleted] Pin
22-Oct-01 11:45
suss22-Oct-01 11:45 
GeneralRe: poor writing skills Pin
Christian Graus22-Oct-01 12:09
protectorChristian Graus22-Oct-01 12:09 
GeneralRe: poor writing skills Pin
Member 77399118-Dec-03 17:56
Member 77399118-Dec-03 17:56 
take it easy... that person only commented about the document. you do not need to blow a vain. if you do not like someones comment, then just delete the message
GeneralRe: poor writing skills Pin
Christian Graus23-Oct-05 12:09
protectorChristian Graus23-Oct-05 12:09 
GeneralRe: poor writing skills Pin
Anonymous20-Oct-05 18:40
Anonymous20-Oct-05 18:40 
GeneralRe: poor writing skills Pin
Christian Graus23-Oct-05 12:10
protectorChristian Graus23-Oct-05 12:10 
GeneralRe: poor writing skills Pin
Kurt Farrar21-Dec-05 4:07
Kurt Farrar21-Dec-05 4:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.