Solved

Blocked Port

Posted on 2000-03-04
7
175 Views
Last Modified: 2010-04-04
If my programm is trying to open a TCP port that is allready in use I get an error message. how do I remove that message and maybe replase it with one off my own?
0
Comment
Question by:SwOoPe
  • 4
  • 2
7 Comments
 
LVL 1

Accepted Solution

by:
delphiexpert earned 5 total points
ID: 2584428
Well I assume that an exception is being generated.

solution:

try
tcp.open;
except
ShowMessage('Error, port is in use!');
end;
0
 

Author Comment

by:SwOoPe
ID: 2585303
It wont aprove the use off  'except'

I get: 'END' expected but 'except' found

Any solution?? I need this to work if I'll add any ports.
0
 

Author Comment

by:SwOoPe
ID: 2585305
By the way, Im using Delphi 4 Client/Server
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:SwOoPe
ID: 2585313
Sorry my fault. I forgot to the 'try' part, but it still dident work.

I still get the usual error mesage from
ScktComp.pas
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2585593
If you run this code inside Delphi you will still raise the exception, but if you just run the exe, it won't...
0
 
LVL 1

Expert Comment

by:delphiexpert
ID: 2585629
. unless you disable "break on exception" under Environment options|debugging. (that's where it is in Delphi 3 anyway)
0
 

Author Comment

by:SwOoPe
ID: 2585847
Thanks u were right
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 53
Find and Replace Stream with 0s 8 62
DBGrid or StringGrid ? 6 88
Twebbrowser in Fire monkey android scrolling to bottom 1 29
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question