Вниз
Скачать: 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.051 c
1-1079382820
HepB
2004-03-15 23:33
2004.04.04
Старт в свёрнутом виде


14-1078598788
ChcngerMan
2004-03-06 21:46
2004.04.04
Трафик :.


3-1078569469
Vladimir_Shk2
2004-03-06 13:37
2004.04.04
Динамически добавить вычисляемое поле


7-1074007088
_наблюдатель_
2004-01-13 18:18
2004.04.04
crHandPoint


14-1078952159
ST
2004-03-10 23:55
2004.04.04
Delphi 8.0




   Наверх