Contents Index Topic Contents | ||
Previous Topic: RetrieveUrlCacheEntryFile Next Topic: SetUrlCacheEntryGroup |
RetrieveUrlCacheEntryStream
HANDLE RetrieveUrlCacheEntryStream( IN LPCSTR lpszUrlName, OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo, IN OUT LPDWORD lpdwCacheEntryInfoBufferSize, IN BOOL fRandomRead, IN DWORD dwReserved );Provides the most efficient and implementation-independent way of accessing the cache data.
- Returns a valid handle for use in the ReadUrlCacheEntryStream and UnlockUrlCacheEntryStream functions if successful, or NULL otherwise. To get extended error information, call GetLastError. Possible error values include:
ERROR_FILE_NOT_FOUND The cache entry specified by the source name is not found in the cache storage. ERROR_INSUFFICIENT_BUFFER 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.
- lpszUrlName
- Address of a 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.
- lpCacheEntryInfo
- Address of an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.
- lpdwCacheEntryInfoBufferSize
- Address of a variable that specifies the size of the lpCacheEntryInfo buffer. When the function returns, the variable receives the number of bytes copied to the buffer, or the required size of the buffer.
- fRandomRead
- Flag to indicate whether the stream is open for random access. Set the flag to TRUE to open the stream for random access.
- dwReserved
- Reserved; must be zero.
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://example.com/example.htm#sample, was passed, the function would return ERROR_FILE_NOT_FOUND even if http://example.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.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.