Очистка кэша в IE

Советы » Браузер » Очистка кэша в IE

Uses

WinINet;
Procedure

TForm1.Button1Click( Sender : TObject ); Var


lpEntryInfo : PInternetCacheEntryInfo; hCacheDir : LongWord;
dwEntrySize : LongWord; dwLastError : LongWord; Begin


dwEntrySize := 0;
FindFirstUrlCacheEntry(NIL,TInternetCacheEntryInfo(NIL^), dwEntrySize );
GetMem(lpEntryInfo, dwEntrySize); hCacheDir := FindFirstUrlCacheEntry(NIL, lpEntryInfo^,dwEntrySize); If ( hCacheDir <> 0 ) Then DeleteUrlCacheEntry(lpEntryInfo^.lpszSourceUrlName); FreeMem( lpEntryInfo ); Repeat
dwEntrySize := 0;
FindNextUrlCacheEntry(hCacheDir, TInternetCacheEntryInfo(NIL^), dwEntrySize);
dwLastError := GetLastError(); If (GetLastError = ERROR_INSUFFICIENT_BUFFER) Then Begin
GetMem(lpEntryInfo, dwEntrySize); If (FindNextUrlCacheEntry(hCacheDir, lpEntryInfo^, dwEntrySize)) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName ); FreeMem(lpEntryInfo);
End;
Until ( dwLastError = ERROR_NO_MORE_ITEMS ); End

;

Другое по теме:

Категории

Статьи

Советы

Copyright © 2022 - All Rights Reserved - www.delphirus.com