If FindNextUrlCacheEntry () fails, how can I get information about a failed entry again?

FindNextUrlCacheEntry()I got an error while calling ERROR_INSUFFICIENT_BUFFER. Then I want to get the failed record again using the extended buffer. But I found that when I call FindNextUrlCacheEntry(), it seems that I retrieved the one that was next to the failed record. Is there any approach that I can go back to get information about just a failed record?

+3
source share
2 answers

I also observed the same behavior on XP. I am trying to clear IE cache programmatically using WinInet APIs. The code on the following MSDN link works fine on Win7 / Vista, but deletes cache files in batches (multiple starts) on XP. When debugging, I found that the FindNextUrlCacheEntry API gives different sizes for the same record when executed multiple times.

MSDN Link: http://support.microsoft.com/kb/815718

That's what I'm doing:

First of all, I make a call to determine the size of the next URL entry

fSuccess = FindNextUrlCacheEntry (hCacheHandle, 0, & cacheEntryInfoBufferSizeInitial) // cacheEntryInfoBufferSizeInitial = 0 at the moment

false no INSUFFICIENT_BUFFER cacheEntryInfoBufferSizeInitial, , , . (cacheEntryInfoBufferSizeInitial) API WinInet, , . . , , API , ( ), , , . , , 4-5 .

+2

, , , Vista.

0

Source: https://habr.com/ru/post/1710828/


All Articles