Autor Beitrag
F.Art
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mo 05.09.05 12:25 
Wie kann ich bei TServerSocket den folgenden Fehler abfangen ohne das ein Fehlerfenster sich öffnet und den Server deaktivieren?

Zitat:
Windows-Socket-Fehler:Normalerweise darf jeder Socketadresse
(Protokol, Netzwerkadresse oder Anschluss)
nur jeweils einmal verwendet werden (10048), auf API 'blind'
CeeJay D-Magic
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94

Win XP Prof.
Delphi 7, Lazarus 0.9
BeitragVerfasst: Mo 05.09.05 12:57 
Probiers mal im .onerror - Ereigniss,

Dort schreibst einfach
ausblenden Quelltext
1:
errorcode := 0;					

hin

schon sollten keine Fehler mehr auftauchen...
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mo 05.09.05 13:17 
Diese Zeile habe ich schon eingebunden aber der Fehler kommt weiterhin.
Und wie kann ich den speziellen Fehler erkennen lassen und dann bestimmte Dinge ausführen?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 05.09.05 14:32 
Moin!

Möchtest du nicht eventuell lieber einen Mehrfachstart deines Programms unterbinden? Mehr als einmal braucht man einen Serverdienst auf einem System wohl nicht zu starten... :wink: Code dazu gibt´s hier im Forum.

cu
Narses
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mo 05.09.05 14:52 
Das Problem würde weiter bestehen.
Ich habe ein paar Tool die einen Server nutzen und möchte einfach für den Anwender verhindern das eines nicht läuft ohne das er nicht weis weshalb.
Deswegen wollte ich eine Meldung ins Programm einbringen das dieser Port schon verwendet wird und er einen anderen nutzen soll.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 05.09.05 14:56 
Moin!

Dann kannst du es mit:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
try
  ServerSocket1.Open;
except
  ShowMessage('Ahhhrrrgggg!');
  Application.Terminate;
end;

auf jeden Fall fangen... :wink:

cu
Narses
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mo 05.09.05 15:18 
OK so funkt es, THX
CeeJay D-Magic
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94

Win XP Prof.
Delphi 7, Lazarus 0.9
BeitragVerfasst: Mo 05.09.05 21:11 
konnte ja nicht ganz wissen wie du es gemeint hast... :?
Aber jetzt ists mir klar! :roll:

Na denne
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mo 05.09.05 21:11 
Warun nehmt ihr denn nicht  SysErrorMessage(ErrorCode)??

_________________
Gruß Harry
Et spes me per dies sine te ducat et amor me ferat, si dolor spem tollit.