Autor Beitrag
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Di 06.12.05 20:02 
Hallo, ich will mit einer Schleife einen Port ansprechen
und dann schauen obs tut
ich mache das so :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
Procedure TForm1.Button1Click(Sender: TObject);
var i : Integer;
begin
try
For i := StrToInt(Edit1.Text) to StrToInt(Edit2.text) do begin
ClientSocket1.Port := i;
ClientSocket1.Active := True;
Memo1.Lines.Add ('Port  '+IntToStr(i)+' wird gescannt');
end;
except 
Memo1.Lines.Add ('Port  '+IntToStr(i)+'Nicht online');
ClientSocket1.Active := False;
end;
end;


Wo ist denn jetzt mein Fehler?
in Edit1 ist der Anfang, z.B. 1
und in Edit2 das Ende, z.B. 444

Fahlermeldung :
'Asynchroner Socket-Fehler 10049',
kommt aber erst am Ende ...

Moderiert von user profile iconraziel: Titel geändert.
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Di 06.12.05 21:04 
[quote="user profile iconFighter#1"]
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
...
except 
Memo1.Lines.Add ('Port  '+IntToStr(i)+'Nicht online');
ClientSocket1.Active := False;
end;
end;


Vllcht liegt es daran? Kapsele das doch nochmal in ne try..except Behandlung...

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
ebs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Di 06.12.05 21:35 
Wie sieht den die Fehlermeldung aus? Kommt sie von Delphi (Also kannst du "Anhalten" oder "Fortsetzen drücken" oder kommt wirklich eine Windows-Fehlermeldung?

Ich schätze mal es ist eine Delphi, da es eigentlich richtig ist ;)
Denk daran, dass bei try..except nur die Fehlermeldung unter Delphi unterdrückt wir, allerdings nicht unter Delphi.

Das musst du unter Optionen einstellen