Autor Beitrag
Niko S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: So 15.10.06 11:53 
ausblenden 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:
  if listbox2.Items.Strings[0] <> '' then begin
    for i:= 0 to listbox2.itemindex-1 do begin
      idHTTP1.Head('http://PS/l2/patch/'+listbox2.items[i]);
      bins := IdHTTP1.Response.ContentLength;
      if bins = -1 then
        showmessage('Files doesn''t exist! Please contact Administrator!')
      else begin
        gauge1.maxvalue := bins;
        FileStream := TFileStream.Create(listbox2.items[i], fmCreate);
        timer1.Enabled := True;
        try
          IdHttp1.Get('http://IP/l2/patch/'+listbox2.items[i], FileStream);
        finally
          FileStream.Free;
          dfunrar1.FileName := listbox1.Items[i];
          dfunrar1.Extract;
          Application.ProcessMessages;
          listbox1.Items[0] := vers;
          listbox1.Items.SaveToFile('cfg.txt');
          label5.Visible := True;
        end//try end
      end;  //else begin end
    end;  // for- end
  end//if end

Es gibt zugriffsverletzungen bei dem FileStream.Free; ...
Wenn ichs programm starte bekomme ich so viele fenster das das programm sich von selbst schließt!
Ich kann mir aber nicht erklären wieso :(