A part of my program uses WinInet’s caching function (e.g. FindFirstUrlCacheEntry, FindNextUrlCacheEntry) to go through the system cache and delete files that meet certain criteria.
The problem is that when a large file is found in the cache, FindNextUrlCacheEntry fails with ERROR_INSUFFICIENT_BUFFER, and requests an unreasonable buffer size to continue (over 10MB), which I fail to allocate on that system.
I need a way to either:
– Skip large files (somehow get to the next entry)
– Get the cache entry of large files without allocating a large buffer
I noticed the “Retrieve” cache functions, but they all require URLs – and I can’t even get the URL of my entry…
Any suggestions?
Thanks,
Guypo
Turns out it was my bug, WinInet doesn’t actually attempt to read the full file.
Still, a way to skip files could have been useful…