URLDownloadToFile() writes objects in the

2019-08-05 18:32发布

I have a piece of software that downloads images into a working directory and then processes them to create a video; afterwards, those files are removed by an independent script.

The problem is that it also writes files into the following directory (the software runs as a system service):

C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5

To make things worse, there doesn't seem to be a limit to how many files are kept there; this causes server issues due to the hard disc shortage.

In an attempt to prevent files from being cached we have tried the following:

  1. Use Pragma: and Cache-Control: headers on the server to prevent caching on the client;

  2. Use DeleteUrlCacheEntry() to remove the cache entry after download has completed; returns ERROR_FILE_NOT_FOUND;

  3. Use IBindStatusCallback::GetBindInfo() and set the passed grfBINDF to BINDF_NOWRITECACHE|BINDF_PRAGMA_NO_CACHE|BINDF_GETNEWESTVERSION.

Unfortunately, the aforementioned approaches don't prevent cache files from still being written into the internet cache.

Is there something I've missed?

0条回答
登录 后发表回答