예제 #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);
        }
예제 #2
0
        public static void Win32KillProcessByPort(TcpOrUdp type, uint dwPort)
        {
            uint processId = GetProcessIdByPort(TcpOrUdp.TcpType, dwPort);

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