Not really, it's just an old habit. I use UrlDownloadToFile when the data is not so important, in the sense that a missing connection or something does not ruin my application. For instance I use it to get updated currencies, if the download is not successful, I go on with the currencies I already have, and try again later. In my system the accurate currencies are not all that important, because I have to compensate for the difference between the currencies on the billing date and on the paying day anyway. Here is the function I use based on UrlDownloadToFile:
Function getfilefromurl
Lparameters lcRemoteFile,lcLocalFile
Local lnReturn
Declare Integer URLDownloadToFile In urlmon.Dll;
INTEGER pCaller, String szURL, String szFileName,;
INTEGER dwReserved, Integer lpfnCB
lnReturn = URLDownloadToFile (0, lcRemoteFile, lcLocalFile, 0, 0)
Return lnReturn=0
>Tore,
>
>any reason not to directly use UrlDownloadToFile ?
>(since no feedback was given - the only reason I see at the moment...)
>
>regards
>
>thomas