urlmon: Implement URLDownloadToCacheFile

Troy Rollo wine at troy.rollo.name
Thu Jun 29 17:43:09 CDT 2006


On Friday 30 June 2006 07:36, James Hawkins wrote:
> +    lstrcatW(cache_path, backslash);
> +    lstrcatW(cache_path, content);
> +
> +    if (!GetTempFileNameW(cache_path, prefix, 0, cache_path))
> +        return E_FAIL;
> +
> +    if (lstrlenW(cache_path) > dwBufLength)
> +        return E_INVALIDARG;
> +
> +    lstrcpyW(szFileName, cache_path);
> +
> +    return URLDownloadToFileW(lpUnkCaller, szURL, szFileName, 0, pBSC);

This is not the correct behaviour - doing this will result in the cache 
directories filling up with files that are not mentioned in the cache index. 
You should be calling CreateUrlCacheEntryW to get the file name for the new 
file.
-- 
Troy Rollo - wine at troy.rollo.name



More information about the wine-patches mailing list