Autor Beitrag
Iaa_1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 61



BeitragVerfasst: Sa 07.02.09 16:45 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button1Click(Sender: TObject);
var stream:TFileStream;
begin
stream:=TFilestream.create('C:\datei.exe',fmcreate);
idhttp1.host:='host.de';
idhttp1.connect;
idhttp1.Get('ordner/datei.exe',stream);
idhttp1.disconnect;
stream.free
end;
end.


wo liegt der fehler?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 07.02.09 16:47 
In der Art der Fragestellung ;-)

Die meisten Mitglieder hier im Forum sind Programmierer und keine Hellseher; ein wenig mehr Informationen wären also nicht ganz schlecht ;-)

Wenn Du also noch markieren könntest, welche Zeile er anmeckert, wie idhttp1 deklariert ist und was ggf. noch von Interesse sein könnte, würdest Du uns helfen, dich bei deinem Problem zu unterstützen ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Iaa_1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 61



BeitragVerfasst: Sa 07.02.09 16:49 
Das obere ist der source wo der fehler auftritt und der fehler heißt:
[DCC Fehler] Unit1.pas(32): E2362 Auf protected-Symbol TIdTCPClientCustom.Host kann nicht zugegriffen werden

nutze indyhttp und ein button mehr net...

Zeile wo der fehler ist:
idhttp1.host:='host.de';
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Sa 07.02.09 16:51 
Host brauchst / darfst du nicht zu verändern.
Schreib den Host im idHTTP1.Get mit dabei und gut ist.

_________________
PROGRAMMER: A device for converting coffee into software.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 07.02.09 22:17 
Connect und Disconnect braucht man genausowenig (gibts die überhaupt bei TIdHttp :gruebel:), die exakte Adresse der Datei im Netz als erster Parameter bei Get reicht wie user profile iconXentar schon sagte.