Description
This function can be called to determine if a file is in Internet Explorers cache.
CodePrivate 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/")