Solved

Blocked Port

Posted on 2000-03-04
7
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Form ownership 4 159
Making delphi communicate with a c# service 16 138
I want to use librsync in my Delphi backup application. 3 84
firemonkey Android Listview Sort items 7 104
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…

738 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