GetUrlCacheEntryInfoEx Function
GetUrlCacheEntryInfoEx Function

Retrieves information on the cache entry associated with the specified URL, taking into account any redirections that are applied in offline mode by the HttpSendRequest function.

Syntax

BOOLAPI GetUrlCacheEntryInfoEx(
  __in         LPCTSTR lpszUrl,
  __inout_opt  LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  __inout_opt  LPDWORD lpcbCacheEntryInfo,
  __reserved   LPTSTR lpszRedirectUrl,
  __reserved   LPDWORD lpcbRedirectUrl,
  __reserved   LPVOID lpReserved,
  __in         DWORD dwFlags
);


Parameters

lpszUrl [in]

Pointer to a null-terminated string that contains the name of the cache entry. The name string should not contain any escape characters.

lpCacheEntryInfo [in, out, optional]

Pointer to an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.

lpcbCacheEntryInfo [in, out, optional]

Pointer to a variable that specifies the size of the lpCacheEntryInfo buffer, in bytes. When the function returns, the variable contains the number of bytes copied to the buffer, or the required size of the buffer in bytes.

lpszRedirectUrl [out]

This parameter is reserved and must be NULL.

lpcbRedirectUrl [in, out]

This parameter is reserved and must be NULL.

lpReserved

This parameter is reserved and must be NULL.

dwFlags [in]

This parameter is reserved and must be 0.

Return Value

Returns TRUE if the URL was located, or FALSE otherwise. Call GetLastError for specific error information. Possible errors include the following.

Return codeDescription
ERROR_FILE_NOT_FOUND

The URL was not found in the cache index, even after taking any cached redirections into account.

ERROR_INSUFFICIENT_BUFFER

The buffer referenced by lpCacheEntryInfo was not large enough to hold the requested information. The size of the buffer needed will be returned to lpdwCacheEntryInfoBufSize.

 

Remarks

GetUrlCacheEntryInfo 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 is passed, the function returns ERROR_FILE_NOT_FOUND even if http://example.com/example.htm is in the cache.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
VersionInternet Explorer 4.0 or later
HeaderWininet.h
LibraryWininet.lib
DLLWininet.dll
Unicode and ANSI namesGetUrlCacheEntryInfoExW (Unicode) and GetUrlCacheEntryInfoExA (ANSI)

See Also

Caching
WinINet Functions

Send comments about this topic to Microsoft

Build date: 11/19/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View