Closed axetroy closed 1 year ago
We can find the process via netstat.exe -ano and kill with via taskkill.exe /F /T /PID {processID} in windows
netstat.exe -ano
taskkill.exe /F /T /PID {processID}
Here is the example code
Find process: https://github.com/axetroy/kpv/blob/master/process/find_by_port_windows.c.v
Kill process: https://github.com/axetroy/kpv/blob/master/process/kill_windows.c.v
The WinAPI equivalents are: GetTcpTable2's dwOwningPid, TerminateProcess.
GetTcpTable2
dwOwningPid
TerminateProcess
Can I try implementing this?
We can find the process via
netstat.exe -ano
and kill with viataskkill.exe /F /T /PID {processID}
in windowsHere is the example code
Find process: https://github.com/axetroy/kpv/blob/master/process/find_by_port_windows.c.v
Kill process: https://github.com/axetroy/kpv/blob/master/process/kill_windows.c.v