Esempio n. 1
0
        public static string Win32GetProcessNameByPort(TcpOrUdp type, uint dwPort)
        {
            uint    processId = GetProcessIdByPort(TcpOrUdp.TcpType, dwPort);
            Process p         = Process.GetProcessById(Convert.ToInt32(processId));

            return(p.ProcessName);
        }
Esempio n. 2
0
        public static void Win32KillProcessByPort(TcpOrUdp type, uint dwPort)
        {
            uint processId = GetProcessIdByPort(TcpOrUdp.TcpType, dwPort);

            Win32KillProcessById(processId);
        }
Esempio n. 3
0
 private extern static uint GetAllPortByProcessId(TcpOrUdp type, uint dwProcessId, uint[] dwAllPort, uint dwMaxLen);
Esempio n. 4
0
 public static uint Win32GetProcessIdByPort(TcpOrUdp type, uint dwPort)
 {
     return(GetProcessIdByPort(TcpOrUdp.TcpType, dwPort));
 }
Esempio n. 5
0
 private extern static uint GetProcessIdByPort(TcpOrUdp type, uint dwPort);