Solved

Blocked Port

Posted on 2000-03-04
7
173 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

932 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now