Need “Processes with Network Activity” functionality in managed code - Like resmon.exe does it

走远了吗. 提交于 2019-12-06 06:30:36

问题


I am needing to collect a list (In C#) of processes which currently (Or within the past x secs) have have network activity, the names of the processes, and the qty of data sent (Pretty much EXACTLY what is shown on the new Windows 7 Resource Monitor under the network tab).

I know I could use WinPCap to write a complete sniffer myself, But I would prefer not to have the overhead, and I figured if I could do it the same way that win7 resmon.exe does it, I would be ahead of the game - Anyone have any info on how to do that in managed code without WinPCap? Even if its not managed code, I would be happy to wrap it.


回答1:


I know WMI has a number of network classes which give significant information about network activity. I would take a look in Win32 classes and then number operating system, then networking. Here is a link, hope it helps:

WMI Reference



来源:https://stackoverflow.com/questions/3081619/need-processes-with-network-activity-functionality-in-managed-code-like-resm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!