I cant find how to realize a process(PID) to port mapping with C#
For example : port 21 is used by PID 826 (Filezilla.exe)
Someone knows if it's possible
Visual C# General
I cant find how to realize a process(PID) to port mapping with C#
For example : port 21 is used by PID 826 (Filezilla.exe)
Someone knows if it's possible
You could always spawn "netstat -b"
Yes i could parse answer from netstat but i'm looking for a "clean" way to do (like a GUI for netstat)
I have searched everywhere on the internet unsucessfully
Maybe that is not possible with C#
I have already seen this one but it does not explain how to perform a port to process mapping.
There's nothing in .NET to directly do what you want to do. In order to do what you want you'll have to PInvoke several Win32 functions. These functions use several structures that you'll have to define and marshal. For another example see http://files.codes-sources.com/fichier.aspx id=11430&f=easy_socket%5Ciphelper.cs