Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function begins the enumeration of the Internet cache.

Syntax

HANDLE FindFirstUrlCacheEntry( 
  LPCTSTR
 lpszUrlSearchPattern,
  LPINTERNET_CACHE_ENTRY_INFO
 lpFirstCacheEntryInfo,
  LPDWORD 
lpdwFirstCacheEntryInfoBufferSize
);

Parameters

lpszUrlSearchPattern

[in] Address of a string that contains the source name pattern to search for. This can be set to "cookie:" or "visited:" to enumerate the cookies and Uniform Resource Locator (URL) History entries in the cache. If this parameter is NULL, the function uses *.*.

lpFirstCacheEntryInfo

[out] Address of an INTERNET_CACHE_ENTRY_INFOstructure.

lpdwFirstCacheEntryInfoBufferSize

[in, out] Address of an unsigned long integer variable that specifies the lpFirstCacheEntryInfobuffer size, in bytes. When the function returns, the variable contains the number of bytes copied to the buffer, or the required buffer size.

Return Value

If successful, this function returns a handle that the application can use in the FindNextUrlCacheEntryfunction to retrieve subsequent cache entries. If the function fails, the return value is NULL.

ERROR_INSUFFICIENT_BUFFER indicates that the size of lpFirstCacheEntryInfoas specified by lpdwFirstCacheEntryInfoBufferSizeis not sufficient to contain all the data. The value returned in lpdwFirstCacheEntryInfoBufferSizeindicates the buffer size necessary to contain all the data.

Remarks

This function and FindNextUrlCacheEntryreturn variable size data. If ERROR_INSUFFICIENT_BUFFER is returned, the application should allocate a buffer of the size specified by lpdwFirstCacheEntryInfoBufferSize. When the enumeration is complete, call FindCloseUrlCacheto close the handle.

Requirements

Library wininet.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also