C# Class WebCacheTool.WinInetAPI

Interop functions we need (i.e. those dealing with the url cache) from wininet.dll.
Afficher le fichier Open project: petlof/brutile-googleV3

Méthodes publiques

Méthode Description
DeleteFromUrlCache ( string url ) : void

Remove an entry from the url cache.

FindUrlCacheEntries ( string urlPattern ) : ArrayList

Friendly wrapper around the FindUrlCacheEntry APIs that gets a list of the entries matching the given pattern.

GetUrlCacheEntryInfo ( string url ) : INTERNET_CACHE_ENTRY_INFO

More friendly wrapper for the GetUrlCacheEntryInfo API.

RetrieveUrlCacheEntryContents ( string url ) : string

More friendly wrapper for the Retrieve/ReadUrlCacheEntryStream APIs.

Private Methods

Méthode Description
CheckLastError ( string url, bool ignoreInsufficientBuffer ) : void

Helper method to check for standard errors we may see from the WinInet functions.

DeleteUrlCacheEntry ( string lpszUrlName ) : long
FindCloseUrlCache ( IntPtr hEnumHandle ) : long
FindFirstUrlCacheEntry ( string lpszUrlSearchPattern, IntPtr lpFirstCacheEntryInfo, UInt32 &lpdwFirstCacheEntryInfoBufferSize ) : IntPtr
FindNextUrlCacheEntry ( IntPtr hEnumHandle, IntPtr lpNextCacheEntryInfo, UInt32 &lpdwNextCacheEntryInfoBufferSize ) : long
GetUrlCacheEntryInfo ( string lpszUrlName, IntPtr lpCacheEntryInfo, UInt32 &lpdwCacheEntryInfoBufferSize ) : bool
ReadUrlCacheEntryStream ( IntPtr hUrlCacheStream, UInt32 dwLocation, IntPtr lpBuffer, UInt32 &lpdwLen, UInt32 dwReserved ) : IntPtr
RetrieveUrlCacheEntryStream ( string lpszUrlName, IntPtr lpCacheEntryInfo, UInt32 &lpdwCacheEntryInfoBufferSize, long fRandomRead, UInt32 dwReserved ) : IntPtr
ThrowAccessDenied ( string url ) : void

Helper method to throw a standard access denied exception.

ThrowFileNotFound ( string url ) : void

Helper method to throw a standard file not found exception.

ThrowInsufficientBuffer ( string url ) : void

Helper method to throw a standard insufficient buffer exception.

UnlockUrlCacheEntryStream ( IntPtr hUrlCacheStream, UInt32 dwReserved ) : long
WinInetAPI ( ) : System

Static class -- can't create.

Method Details

DeleteFromUrlCache() public static méthode

Remove an entry from the url cache.
public static DeleteFromUrlCache ( string url ) : void
url string
Résultat void

FindUrlCacheEntries() public static méthode

Friendly wrapper around the FindUrlCacheEntry APIs that gets a list of the entries matching the given pattern.
public static FindUrlCacheEntries ( string urlPattern ) : ArrayList
urlPattern string The pattern, which is a regular expression applied by this method, since I've never /// seen any evidence that the first parameter to the FindFirstUrlCacheEntry API actually works.
Résultat System.Collections.ArrayList

GetUrlCacheEntryInfo() public static méthode

More friendly wrapper for the GetUrlCacheEntryInfo API.
public static GetUrlCacheEntryInfo ( string url ) : INTERNET_CACHE_ENTRY_INFO
url string
Résultat INTERNET_CACHE_ENTRY_INFO

RetrieveUrlCacheEntryContents() public static méthode

More friendly wrapper for the Retrieve/ReadUrlCacheEntryStream APIs.
public static RetrieveUrlCacheEntryContents ( string url ) : string
url string
Résultat string