Solved

Blocked Port

Posted on 2000-03-04
7
172 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

743 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

13 Experts available now in Live!

Get 1:1 Help Now