Check if a file is in Internet explorers cache

xiaoxiao2021-03-06  56

Description

This function can be caled to determine if a file is in Internet explorers cache.

Code

Private Declare Function geturlcacheentryInfo Lib "Wininet.dll" Alias ​​_

"Geturlcacheententryinfoa" _

(Byval Surnname as string, _

LPCachentryInfo as Any, _

LPDWCACHEENTRYINFOBUFFERSIZE AS Long) As long

Function Cached (Byval Strurn 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/")

转载请注明原文地址:https://www.9cbs.com/read-114242.html

New Post(0)