RetrieveUrlCacheEntryFile

This function locks the cache entry file associated with the specified URL.

BOOL RetrieveUrlCacheEntryFile (
LPCTSTR lpszUrlName, 
LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
LPDWORD lpdwCacheEntryInfoBufferSize, 
DWORD dwReserved); 

Parameters

  • lpszUrlName
    [in] Address of a string containing the URL of the resource associated with the cache entry. This must be a unique name. The name string should not contain any escape characters.
  • lpCacheEntryInfo
    [out] Address of a cache entry information buffer. If the buffer is not sufficient, this function returns ERROR_INSUFFICIENT_BUFFER and sets lpdwCacheEntryInfoBufferSize to the number of bytes required.
  • lpdwCacheEntryInfoBufferSize
    [in] [out] Address of an unsigned long integer variable that specifies the size of the lpCacheEntryInfo buffer. When the function returns, the variable contains the size of the actual buffer used or required. The caller should check the return value in this parameter. If the return size is less than or equal to the size passed in, all the relevant data has been returned.
  • dwReserved
    [in] Reserved. Must be set to zero.

Return Values

Returns TRUE if successful, or FALSE otherwise.

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 https://example.com/example.htm\#sample was passed, the function would return ERROR_FILE_NOT_FOUND even if https://example.com/example.htm is in the cache.

The file is locked for the caller when it is retrieved; the caller should unlock the file after it has been used up. The cache manager automatically unlocks the locked files after a certain interval. While the file is locked, the cache manager will not remove the file from the cache. It is important to note that this function can be efficient or expensive, depending on the internal implementation of the cache.

For instance, if the URL data is stored in a packed file that contains data for other URLs, the cache will make a copy of the data to a file in a temporary directory maintained by the cache. The cache will eventually delete the copy. It is recommended that this function be used only in situations where a file name is needed to launch an application.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.12 and later Wininet.h   Wininet.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

UnlockUrlCacheEntryFile

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.