Click to Rate and Give Feedback
MSDN
MSDN Library
Networking
Network Protocols
Windows Internet
WinINet Reference
WinINet Functions
 GetUrlCacheEntryInfo Function

  Switch on low bandwidth view
GetUrlCacheEntryInfo Function

Retrieves information about a cache entry.

Syntax

C++
BOOL GetUrlCacheEntryInfo(
  __in     LPCTSTR lpszUrlName,
  __out    LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  __inout  LPDWORD lpcbCacheEntryInfo
);

Parameters

lpszUrlName [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 [out]

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

lpcbCacheEntryInfo [in, out]

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.

Return Value

Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError. Possible error values include the following.

Return codeDescription
ERROR_FILE_NOT_FOUND

The specified cache entry is not found in the cache.

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

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 3.0 or later
HeaderWininet.h
LibraryWininet.lib
DLLWininet.dll
Unicode and ANSI namesGetUrlCacheEntryInfoW (Unicode) and GetUrlCacheEntryInfoA (ANSI)

See Also

Caching
WinINet Functions

Send comments about this topic to Microsoft

Build date: 7/9/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
vb.net syntax      dmex   |   Edit   |   Show History
<DllImport("wininet.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function GetUrlCacheEntryInfo(ByVal lpszUrlName As String, ByVal lpCacheEntryInfo As IntPtr, ByRef lpdwCacheEntryInfoBufferSize As UInt32) As Boolean
End Function
Flag as ContentBug
C# syntax      dmex   |   Edit   |   Show History
[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool GetUrlCacheEntryInfo(string lpszUrlName, IntPtr lpCacheEntryInfo, ref UInt32 lpdwCacheEntryInfoBufferSize);
Tags What's this?: c# (x) syntax (x) Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker