Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
Cookies löschen
31. Jan 2003, 00:26
Delphi-Quellcode:
uses
WinInet;
[...]
procedure TForm1.Cookies1Click(Sender: TObject);
var
icei : PINTERNETCACHEENTRYINFO;
dwSize : DWord;
hSearch : DWord;
begin
CheckListBox1.Items.BeginUpdate;
CheckListBox1.Items.Clear;
dwSize := 65536;
icei := AllocMem(dwSize);
try
hSearch := FindFirstURLCacheEntry('visited:',icei^,dwSize);
if hSearch = 0 then
begin
ShowMessage(SysErrorMessage(GetLastError)+' '+IntToStr(dwSize));
exit;
end;
while hSearch <> 0 do
begin
Application.ProcessMessages;
CheckListBox1.Items.Add(icei^.lpszSourceUrlName);
dwSize := 65536;
if not FindNextURLCacheEntry(hSearch,icei^,dwSize) then
begin
hSearch := 0;
end;
end;
finally
FreeMem(icei,65536);
CheckListBox1.Items.EndUpdate;
end;
end;
procedure TForm1.Lschen1Click(Sender: TObject);
var
i : integer;
begin
for i := 0 to CheckListBox1.Items.Count-1 do
begin
if CheckListBox1.Checked[i] then
begin
DeleteURLCacheEntry(PChar(CheckListBox1.Items[i]));
end;
end;
Cookies1.Click;
end;
Autor Christin Seehase.
[edit=sakura] uses eingefügt. Mfg, sakura[/edit]
[edit=Matze] Mfg, Matze[/edit]
Michael Ein Teil meines Codes würde euch verunsichern.
|
|
Zitat
|