Provides the most efficient and implementation-independent way to access the cache data.
void RetrieveUrlCacheEntryStreamA( LPCSTR lpszUrlName, LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo, LPDWORD lpcbCacheEntryInfo, BOOL fRandomRead, DWORD dwReserved );
Pointer to a null-terminated string that contains the source name of the cache entry. This must be a unique name. The name string should not contain any escape characters.
Pointer to an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.
Pointer to a variable that specifies the size, in bytes, of the lpCacheEntryInfo buffer. When the function returns, the variable receives the number of bytes copied to the buffer or the required size, in bytes, of the buffer. Note that this buffer size must accommodate both the INTERNET_CACHE_ENTRY_INFO structure and the associated strings that are stored immediately following it.
Whether the stream is open for random access. Set the flag to TRUE to open the stream for random access.
This parameter is reserved and must be 0.
If the function fails, it returns NULL. To get extended error information, call GetLastError.
Possible error values include the following.
||The cache entry specified by the source name is not found in the cache storage.|
||The size of lpCacheEntryInfo as specified by lpdwCacheEntryInfoBufferSize is not sufficient to contain all the information. The value returned in lpdwCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.|
RetrieveUrlCacheEntryStream does not do any URL parsing, so a URL containing an anchor (#) will not be found in the cache, even if the resource is cached. For example, if the URL http://adatum.com/example.htm#sample is passed, the function returns ERROR_FILE_NOT_FOUND even if http://adatum.com/example.htm is in the cache.
Cache clients that do not need URL data in the form of a file should use this function to access the data for a particular URL.
Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
|Windows version||Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]|