Running a C++ program via VS2015 IDE in debug mode and it shutting down incorrectly causes rogue processes to keep on listening to the TCP port it uses.
When I get to re-run the application in debug mode, although the application thinks it is listening to the TCP port, it actually isn't due to the rogue process(es) that previously weren't closed down properly.
I am trying to kill these processes but they will only show up in TCPView.exe
https://learn.microsoft.com/en-us/sysinternals/downloads/tcpview
I have read this:
Really killing a process in Windows
but no solutions provided there work in my case. The only remotely promising solution might be ntsd.exe but it is not supported on Win7 or Win10, so I could not actually test it. Using an IDE debugger like the one with VS2015 only shows working PIDs (i.e. non-ghost).
I want to find a way to remove these processes without having to restart or log in/out of my machine.
Can anyone help?
Thanks.