Delphi-Quellcode:
var get:TSplit;
FStream:TFileStream;
IdHTTP1:TIdCustomHTTP;
begin
UpdTimer.Enabled:=false;
IdHTTP1:=TIdCustomHTTP.Create(Form1);
IdHTTP1.OnWork:=IdHTTPWork; //funktioniert nicht
IdHTTP1.OnWorkBegin:=IdHTTPWorkBegin;//funktioniert nicht
IdHTTP1.OnWorkEnd:=IdHTTPWorkEnd; //funktioniert
get:=Split('#',idHTTP1.Get(infoURL));
if Version<>get[0] then begin
FStream:=TFileStream.Create('C:\'+get[1],fmCreate or fmShareDenyNone);
try
IdHTTP1.Get(infoURL+get[1],FStream);
Input1.Text:=extractFilePath(paramstr(0));
finally
if Assigned(FStream) then FStream.Free;
end;
end;
end;
Delphi-Quellcode:
procedure TForm1.IdHTTPWork(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
//irgendwas
end;
procedure TForm1.IdHTTPWorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
begin
//irgendwas
end;
procedure TForm1.IdHTTPWorkEnd(Sender: TObject; AWorkMode: TWorkMode);
begin
//irgendwas
end;
Alle 3 Erieignisse habe ich generieren lassen.
Die message kommt:
Incompatible types: 'Parameter lists differ'