查查以前的问题呀!
uses wininet;
procedure TForm1.Button1Click(Sender: TObject);
var
cache_info
InternetCacheEntryInfo;
cbSizeOf_Cache_info:dword;
hw:hwnd;
buf:tstrings;
begin
// buf:=tstringlist.Create;
new(cache_info);
hw:=FindFirstUrlCacheEntryEx(nil,0,NORMAL_CACHE_ENTRY or URLHISTORY_CACHE_ENTRY,0,cache_info,@cbSizeOf_Cache_info,nil,nil,nil);
if hw<>0 then
begin
DeleteUrlCacheEntry(cache_info.lpszSourceUrlName);
// buf.Add(cache_info.lpszSourceUrlName);
while FindNextUrlCacheEntryEx(hw,cache_info,@cbSizeOf_Cache_info,nil,nil,nil) do
// buf.Add(cache_info.lpszSourceUrlName);
DeleteUrlCacheEntry(cache_info.lpszSourceUrlName);
end;
FindCloseUrlCache(hw);
dispose(cache_info);
// showmessage(buf.Text);
// buf.Free;
end;