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!