Вниз
Скачать: CL | DM;

Как очистить папку History?   Найти похожие ветки 

 
Sound   (2004-01-23 17:27) [0]

При разработке программы возникла необходимость очистки папки History ("Журнал") Windows, может кто подскажет какие-нибудь функции (может уже есть WinAPI?) либо подкинте доков..


 
Barmutik ©   (2004-01-25 14:03) [1]

Вообщем там много кода ещё .. если надо то напиши на почту...

procedure ClearHistory;
var
 HistoryStg: IUrlHistoryStg2;
 H: THandle;
 s: string;
begin
 try
   HistoryStg := CreateComObject(CLSID_CUrlHistory) as IUrlHistoryStg2;
   if HistoryStg <> nil then
     HistoryStg.ClearHistory;
 except
 end;

 if DeleteFirstCacheEntry(H, "Visited") = S_OK then
   repeat
   until DeleteNextCacheEntry(H, "Visited") = ERROR_NO_MORE_ITEMS;
 FindCloseUrlCache(H);

 s := GetUserShellFolder("History");
 if s = "" then
   Exit;
 ClearTree(PAnsiChar(s), False);
 except
   on E: Exception do
   begin
     raise;
   end;
 end;

function ClearTree(const Path: string; DeleteRoot: Boolean): Boolean;
begin
 Result := ClearTreeEx(Path, DeleteRoot, False, nil);
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.019 c
1-1079466515
fun
2004-03-16 22:48
2004.04.04
Programming


14-1079074549
Rentgen
2004-03-12 09:55
2004.04.04
(2*Pi*R*R)/Z*R...


6-1074752837
Hooch
2004-01-22 09:27
2004.04.04
кодировка поля Subject в письме


7-1074028531
lipskiy
2004-01-14 00:15
2004.04.04
NTLM-авторизация?


1-1079582732
DNS
2004-03-18 07:05
2004.04.04
Поиск в StringGrid?




   Наверх