Autor Beitrag
nina
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62



BeitragVerfasst: Mi 22.01.03 13:47 
Hallo!

Habe da ein Problem mit dem Code.
Ich möchte sämtliche Temp Dateien löschen. Doch sobald ich das Programm starte, die Temp Datei markiere und dann auf Löschen drücke, stürzt mir mein Programm ab! Kann mir jemand verraten warum?

Gruss nina

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
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;
Luncustaf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 324

Win 2k
D7 Ent.
BeitragVerfasst: Mi 22.01.03 15:53 
liegt wohl daran das du den cache leeren willst und nicht den temp ordner :)