CacheVW.exe Enumerates and Displays Wininet Cache

ID: Q172607


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) versions 3.0, 4.0, 4.01


SUMMARY

CacheVW.exe is a sample that demonstrates how to enumerate and display Wininet cache entries. CacheVW.exe contains three files: Cachevw.cpp, Cachevw.rc, and Makefile. If you have Win32 SDK or Visual C++ installed, you can run the nmake utility to compile the sample. CacheVW.exe uses the following Wininet caching APIs:

  • FindFirstUrlEntry


  • FindNextUrlCacheEntry


  • FindCloseUrlCache


  • GetCacheEntryInfo


  • RetrieveUrlCacheEntryStream


  • ReadUrlCacheEntryStream


  • UnlockUrlCachEntryStream



MORE INFORMATION

The following file is available for download from the Microsoft Software Library: The following files are available for download from the Microsoft Download Center. Click the file names below to download the files:

Cachevw.exe
For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center. FindNextUrlCacheEntry in Internet Explorer 3.x version of Wininet.dll has a bug where an entry is skipped if the initial buffer supplied is too small. When the function gets to an entry that is larger than the buffer supplied, it returns the buffer size required and the error ERROR_INSUFFICIENT_BUFFER. On the next call to FindNextUrlCacheEntry, it goes to the next cache entry instead of the one that returned ERROR_INSUFFICIENT_BUFFER. To work around the bug, use an initial buffer of at least 2048 bytes in FindNextURLCacheEntry. This bug will be fixed in the Internet Explorer 4.0 Wininet.dll. If the application is designed to run only with the Internet Explorer 4.0 version of Wininet.dll, it's better to dynamically allocate the buffer. The application could use a much smaller initial buffer--512 bytes, for example--to enumerate the cache. This is usually sufficient for most of cache entries.

In the Internet Explorer 3.x version of Wininet, the size cache entry info structure is limited to 2,048 bytes, and Wininet.h for Internet Explorer 3.0x has the following define:
define MAX_CACHE_ENTRY_INFO_SIZE 4096
In Internet Explorer 4.0 there will be no size limit to the cache entry info structure and the MAX_CACHE_ENTRY_INFO_SIZE flag will also be removed from the Internet Explorer 4.0 Wininet.h file. Therefore application developers may need to define MAX_CACHE_ENTRY_INFO value themselves when porting their Wininet application from Internet Explorer 3.x to Internet Explorer 4.0 and using the Internet Explorer 4.0 version Wininet.h.

Additional query words:

Keywords : kbfile kbIE300 kbIE400 kbIE401 kbWinInet kbDSupport
Version : WINDOWS:3.0,4.0,4.01
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: December 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.