getting all tcp connections for a process like "netstat -b" in .net code

I need to write some code to determine which tcp connection(s) are opened by a particular process on the local machine.  This code will run locally on the same machine as the process that is creating the network connections.  This process is known by the executable file's name.  I need the IP address(es) that it is connecting to.  This process is a piece of middleware and is not a .net process and I do not have the source code for it.

The windows command line utility "netstat" executed with "-b" flag gives me the answer.  I'd like the .net equivalent of that.  I'd prefer not to start a command line "netstat -b" in .net code and parse the output - that is the obvious answer.
sevzasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sevzasAuthor Commented:
Wikipedia indicates that the windows implementation of netstat uses GetTcpTable in Ip Helper dll.

More info can be found here
http://lamahashim.blogspot.com/2010/03/disabling-network-using-c.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.