How to list active connections for a process in win2k?

I'm sure many people have been trying the same thing, but I need to get the name or id of the process that owns a certain ip port or connection on the machine. I found the undocumented API:s called AllocateAndGetTcpExTableFromStack and AllocateAndGetUdpExTableFromStack but as far as I know, they are only available for WinXP and possible Win2k3 as well, but my program should run on win2k as well. I've been looking for hours for a way do get open connections for a process in win2k, but it's impossible. I don't want to write my own device driver...

Some tools do it, like Fport.exe, but I wonder how!


So, any idea about how to solve this? Preferably in c# or vb.net...

No Comments