开发者

How do I find out what process opened what port?

I want a method of finding out what process opened what port without the aid of an external application. I.e. no netstat or other tools like 开发者_如何学Pythonit.


You need to use the IP helper functions. More specifically GetExtendedTcpTable and GetExtendedUdpTable.

For example, for GetExtendedUdpTable, you can pass in MIB_UDPTABLE_OWNER_PID as the TableClass and you will be able to receive the PID of the process that issued the call to bind for the UDP endpoint.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜