我用visual 2008 C++ 编个小应用程序,我想实时地得到(比如每20秒刷新一次)当前
系统中有哪些正在运行的socket, 这些socket对应的系统process name是什么?
请问大牛:我怎样才能实现这个功能呢?winsock有提供对应的API吗?请大牛不吝赐教
,万分感谢!
z***e 发帖数: 5393
2
windows has the command "netstat" to do what you want (and go www.
sysinternal.com for tcpview)
windows sdk has a C# sample for netstat.
There are some other code samples online. you can bing(^_^) "netstat source
code".
or more specifically, check out this and related: http://msdn.microsoft.com/en-us/library/aa365928.aspx