How to detect ports in the system?

Gopinath's Avatar, Join Date: Jun 2006
Newbie Member
Hi all,

I'm developing an application, which require to detect ports in the system. exactly what my requirement is i need to detect if some device ( modems) or application tried to connect to
some port then i should be able to display a message box.

could any one help me in this regard.

Thanks in advance.
kush_2207's Avatar, Join Date: Jun 2007
Go4Expert Member
In windows as well as linux theres a command known as netstat -a which lists out all the ports in listening state......
Now you need to make a call to these command......Refer to the documentation of the language you are using.....
There must be something that is provided within the language library....that depends totally on language which you are using...