Autor Beitrag
Licki
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Di 30.09.03 15:00 
Hi...

Gibt es eine Funktion um den Inhalt des Ordners Temporary Internet Files zu löschen. Habe Funktionen gefunden um den Inhalt von Ordnern zu löschen, aber leider geht das nicht, da Systemordner. Weiß jemand Rat?
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 30.09.03 16:13 
Ja, s. MSDN -> FindFirstUrlCacheEntry und Co. Das schrieb ich aber schon mal im Beitrag bestimmte "Temporary Internet File" löschen???
Licki Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Mo 20.10.03 12:47 
Habe nun eine Zeit lang damit rumprobiert und komme nicht zurecht. Hat nicht jemand einen Code, um den Temporären Internetschrott zu löschen? Damit ich mir das anschauen kann? Das wäre echt riesig...
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 21.10.03 15:04 
Zeig doch mal, was du bisher versucht hast.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 21.10.03 15:18 
oder schau mal unter www.swissdelphicenter.ch/de/ da gibts nen tipp. ich hab ihn nur nicht rausgesucht !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Licki Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Mi 22.10.03 14:59 
Der Tipp von Swissdelphicenter geht aber nicht, ... :?:
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 22.10.03 15:31 
Wie wär´s denn mal anstelle von
Zitat:
Das geht nicht ... :bawling:

mit einer vernünftigen Aussage, etwa
Zitat:
Ich habe das Beispiel probiert, aber es scheint nicht zu gehen, weil ...

:roll: Das wäre weitaus nützlicher, wenn du Hilfe suchst.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 22.10.03 16:29 
der code ausm swissdelphicenter funktioniert ganz sicher !!! evtl musst du ewig lang warten wennd eine temp internet files voll sind !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Licki Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Do 23.10.03 11:30 
Okay... Der Code vom Swissdelphicenter:

ausblenden volle Höhe Delphi-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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, WinInet, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

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;

procedure TForm1.Button1Click(Sender: TObject);
begin
  DeleteIECache;
end;


Fehlermeldung:

Undefinierter Bezechnert LongWord.
Habe schon anderen Variablentyp (Word, DWord) ausprobiert. Hat nicht geklappt. Und auch mal mit Integer und die anderen Ausdrücken dann entsprechend umkonvertiert. Skript lieft zwar, hat aber rein garnichts gemacht.

Und in diesen Zeilen ist ein Fehler, immer der gleiche:

ausblenden Delphi-Quelltext
1:
FindFirstUrlCacheEntry(nil, TInternetCacheEntryInfo(nil^), dwEntrySize);					


ausblenden Delphi-Quelltext
1:
hCacheDir := FindFirstUrlCacheEntry(nil, lpEntryInfo^, dwEntrySize);					


ausblenden Delphi-Quelltext
1:
until not FindNextUrlCacheEntry(hCacheDir, lpEntryInfo^, dwEntrySize);					


Die Fehlermeldung lautet: Die Typen der der tatsächlichen und formalen Var- Parameter müssen übereinstimmen.

Ich erwarte keinen kompletten Quelltext, bin aber noch nicht so fit in Delphi. Ich arbeite eher an Datenbanken und kleineren Programmen. Aber von dem hier habe ich nicht soviel Ahnung.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 23.10.03 14:10 
evtl. liegt das an deinem delphi 4 !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Licki Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Fr 24.10.03 09:36 
Ich habe es mit Delphi 3 und 4 probiert, klappte beides nicht.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 24.10.03 14:52 
hast grad kein D5 zur hand ? weil der code geht bei mir 100%ig !

_________________
In the beginning was the word.
And the word was content-type: text/plain.