I know various firewall software, including the one built into windows XP can tell which application is using the network when it tries to connect (and can restrict on access). Is there any way to tell which application (and what PID) is using a specific port? Can I hook something in the system to get notified when a program opens a connection? It must be possible, but how?
chad wrote: > I know various firewall software, including the one built into windows > XP can tell which application is using the network when it tries to > connect (and can restrict on access). Is there any way to tell which > application (and what PID) is using a specific port? Can I hook > something in the system to get notified when a program opens a > connection? > > It must be possible, but how? This has been asked numerous times on win32.programmer.networks group. Google it to find the answers. Also note that win32.programmer.networks is the place to ask such questions. This group is not really visited anymore. -- Eugene http://www.gershnik.com
Why , you are here and some others too :) ?! Many years ago ( 5- 6 ) MS wanted to remove it, but still guys continue to ask here the questions and receive the answers ( I really don't know if sufficient :) ) Arkady "Eugene Gershnik" wrote in message news:esP3ivpJGHA.3896@TK2MSFTNGP15.phx.gbl... > chad wrote: >> I know various firewall software, including the one built into windows >> XP can tell which application is using the network when it tries to >> connect (and can restrict on access). Is there any way to tell which >> application (and what PID) is using a specific port? Can I hook >> something in the system to get notified when a program opens a >> connection? >> >> It must be possible, but how? > > This has been asked numerous times on win32.programmer.networks group. > Google it to find the answers. Also note that win32.programmer.networks is > the place to ask such questions. This group is not really visited anymore. > > > -- > Eugene > http://www.gershnik.com > >
In XP you have AllocateAndGetTcpExTableFromStack() documented :) in http://www.sysinternals.com/files/netstatp.zip In OS you see that with "netstat -o" Arkady "chad" wrote in message news:1138734110.467569.4940@g44g2000cwa.googlegroups.com... >I know various firewall software, including the one built into windows > XP can tell which application is using the network when it tries to > connect (and can restrict on access). Is there any way to tell which > application (and what PID) is using a specific port? Can I hook > something in the system to get notified when a program opens a > connection? > > It must be possible, but how? >