RetrieveUrlCacheEntryStream (Windows CE 5.0)

Send Feedback

Provides the most efficient and implementation-independent way to access the cache data.

HANDLE RetrieveUrlCacheEntryStream(  LPCTSTR lpszUrlName  LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  LPDWORD lpdwCacheEntryInfoBufferSize,  BOOL fRandomRead,  DWORD dwReserved);

Parameters

  • lpszUrlName
    [in] 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.
  • lpCacheEntryInfo
    [out] Pointer to an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.
  • lpdwCacheEntryInfoBufferSize
    [in, out] 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.
  • fRandomRead
    [in] Whether the stream is open for random access. Set the flag to TRUE to open the stream for random access.
  • dwReserved
    [in] Reserved. Must be zero.

Return Values

If the function succeeds, the function returns a valid handle for use in the ReadUrlCacheEntryStream and UnlockUrlCacheEntryStream functions.

If the function fails, it returns NULL. To get extended error information, call GetLastError.

Possible error values include the following.

Return code Description
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

Remarks

This function 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.

Requirements

OS Versions: Windows CE 2.12 and later.
Header: Wininet.h.
Link Library: Wininet.lib.

See Also

WinInet Functions | UnlockUrlCacheEntryStream

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.