C# Class WebCacheTool.WinInetAPI

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

Public Methods

Method 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

Method 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 method

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

FindUrlCacheEntries() public static method

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.
return System.Collections.ArrayList

GetUrlCacheEntryInfo() public static method

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

RetrieveUrlCacheEntryContents() public static method

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