This function can be called to determine if a file is in Internet Explorers cache.
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
Just call the function and give it the url of the file you want to check:
MsgBox Cached("http://msdn.microsoft.com/")
本文地址:http://com.8s8s.com/it/it43986.htm