CSDN博客

img wm_ni

Check if a File is in Internet Explorers Cache

发表于2004/9/22 15:15:00  615人阅读

Description

This function can be called to determine if a file is in Internet Explorers cache.

Code

Private Declare Function GetUrlCacheEntryInfo Lib "wininet.dll" Alias _
    "GetUrlCacheEntryInfoA" _
    (ByVal sUrlName As String, _
    lpCacheEntryInfo As Any, _
    lpdwCacheEntryInfoBufferSize As Long) As Long

Function Cached(ByVal strURL As String) As Boolean
    Dim buffer As Long
    
    If (GetUrlCacheEntryInfo(strURL, ByVal 0&, buffer)) = 0 Then
    If (Err.LastDllError = 122) Then Cached = True
        
End Function

 

Example Usage

Just call the function and give it the url of the file you want to check:

MsgBox Cached("http://msdn.microsoft.com/")
0 0

相关博文

我的热门文章

img
取 消
img