2010. 4. 21. 22:57
Download a File Using URLDownloadToCacheFile
2010. 4. 21. 22:57 in 3. Implementation/Windows API

You can use WinInet to download a file from the Internet. But the easier way is to use
the
......
http://www.codeproject.com/KB/IP/urlfile.aspx
::URLDownloadToCacheFile()
or ::URLDownloadToFile()
functions. The URL functions combine the
capabilities of asynchronous monikers and URL monikers into easy-to-use functions. By using
these functions, you do not have to worry about the protocols used to transfer the files,
such as HTTP, FTP. In the simplest case, all you have to do is to pass them the URL.
::URLDownloadToCacheFile()
downloads data into the Internet cache and returns the file name of
the cache location for retrieving the bits. ::URLDownloadToFile()
downloads bits from the
Internet and saves them to a file. However, they are blocking functions. Even though the data
is downloaded asynchronously the functions do not return until all the data is downloaded.
You can choose to be notified of progress through a notification callback.......
http://www.codeproject.com/KB/IP/urlfile.aspx