怎么样删COOKIES(50分)

  • 主题发起人 主题发起人 jjm1227
  • 开始时间 开始时间
J

jjm1227

Unregistered / Unconfirmed
GUEST, unregistred user!
请问用DELPHI写怎么样删COOKIES?
 
怎么回事呢?没有人知道吗?
 
uses
WinInet;
procedure DeleteIECache;
var
lpEntryInfo: PInternetCacheEntryInfo;
hCacheDir: LongWord;
dwEntrySize: LongWord;
begin
dwEntrySize := 0;
FindFirstUrlCacheEntry(nil, TInternetCacheEntryInfo(nil^), dwEntrySize) ;
GetMem(lpEntryInfo, dwEntrySize) ;
if dwEntrySize > 0 then lpEntryInfo^.dwStructSize := dwEntrySize;
hCacheDir := FindFirstUrlCacheEntry(nil, lpEntryInfo^, dwEntrySize) ;
if hCacheDir <> 0 then
begin
repeat
DeleteUrlCacheEntry(lpEntryInfo^.lpszSourceUrlName) ;
FreeMem(lpEntryInfo, dwEntrySize) ;
dwEntrySize := 0;
FindNextUrlCacheEntry(hCacheDir, TInternetCacheEntryInfo(nil^), dwEntrySize) ;
GetMem(lpEntryInfo, dwEntrySize) ;
if dwEntrySize > 0 then lpEntryInfo^.dwStructSize := dwEntrySize;
until not FindNextUrlCacheEntry(hCacheDir, lpEntryInfo^, dwEntrySize) ;
end;
FreeMem(lpEntryInfo, dwEntrySize) ;
FindCloseUrlCache(hCacheDir) ;
end;
 
好的..谢谢.
 
接受答案了.
 
后退
顶部