@ IceBube
Hast du dafür vll ein Beispiel?
@ Luckie
Um genauer auf mein Problem einzugehen,ich weiß nicht ganz wie ich das hier einfügen muss:
Delphi-Quelltext
1: 2:
| type cDownloadStatusCallback = class(TObject,IUnknown,IBindStatusCallback) |
weil es ist beim neu erzeugen ja schon so:
Delphi-Quelltext
1: 2:
| type TForm1 = class(TForm) |
und so funktioniert das nicht:
Delphi-Quelltext
1: 2: 3:
| type TForm1 = class(TForm) cDownloadStatusCallback = class(TObject,IUnknown,IBindStatusCallback) |
Edit:
Hab zu Indy jetzt das hier gefunden:
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: 55:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, idHTTP, StdCtrls, ComCtrls, IdBaseComponent, IdComponent, IdTCPServer, IdCustomHTTPServer, IdHTTPServer, IdTCPConnection, IdTCPClient;
type TForm1 = class(TForm) Button1: TButton; ProgressBar1: TProgressBar; IdHTTP1: TIdHTTP; procedure Button1Click(Sender: TObject); private public procedure IdHTTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer); procedure IdHTTP1Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer); end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject); var stream:TFilestream; begin stream:=TFilestream.create('C:\Rrring_2.5.rar',fmcreate); idhttp1.Host:='diamonddog.jeak.de'; idhttp1.connect; idhttp1.Get('infium/rrring/Rrring_2.5.rar',stream); idhttp1.disconnect; end;
procedure TForm1.IdHTTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer); begin progressbar1.min:=0; progressbar1.max:=aworkcountmax end;
procedure TForm1.IdHTTP1Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer); begin progressbar1.position:=aworkcount end;
end. |
Problem dabei ist das der Downloadprozess nicht angezeigt wird.
Und ich immer folgenden Fehler erhalte:
HTTP/1.1 400 Bad Request.
Edit:
Downloadproblem gelöst.
Für das progressbar Problem mach ich nen neun Theard auf,
weils mit dem hier nich mehr wirklich was zu tuhn hat.