Autor Beitrag
DiamondDog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mi 05.11.08 18:01 
Hallo Leute,
also ich hab das folgendes gefunden:
Zur Seite
Meine Frage dazu ist kann mir das vll jemand als Beispiel machen?
Weil irgend wie bekomme ich das nicht ganz auf die Rolle.
Wäre echt super nett.

Danke schon mal.

Mfg Dog
IceBube
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 231



BeitragVerfasst: Mi 05.11.08 18:03 
Wieso machst du es nicht mit Indy?

lg
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 05.11.08 18:10 
Da ist doch ein Beispiel dabei am Ende vom ersten Beitrag, wie man den Code nutzt.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mi 05.11.08 18:19 
@ 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:
ausblenden Delphi-Quelltext
1:
2:
type 
  cDownloadStatusCallback = class(TObject,IUnknown,IBindStatusCallback)
weil es ist beim neu erzeugen ja schon so:
ausblenden Delphi-Quelltext
1:
2:
type
  TForm1 = class(TForm)
und so funktioniert das nicht:
ausblenden Delphi-Quelltext
1:
2:
3:
type
  TForm1 = class(TForm) 
  cDownloadStatusCallback = class(TObject,IUnknown,IBindStatusCallback)


Edit:
Hab zu Indy jetzt das hier gefunden:
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:
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
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
    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.