如何使用C#监视IE进程的网络使用情况 [英] How to Monitor the Network usage by an IE process using C#
本文介绍了如何使用C#监视IE进程的网络使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以通过哪种方式确定IE使用C#的网络使用情况。
任何API我们可以用来满足需要或任何示例代码。
问候,
Ayush Jain
解决方案
您有几种选择:
1)有Microsoft网络监视器的API( Network Monitor API [ ^ ])你可以使用。它作为应用程序的一部分安装,还有一个NetmonAPI.cs
,它包含所有定义。你可能会在那里找到一些样本。
2)如果你只对http流量感兴趣,你可以建立一个http代理。从这里开始:http://www.codeproject.com/Articles/93301/Implementing-a-Multithreaded-HTTP-HTTPS-Debugging
3)您可以通过WMI访问过程数据:http://msdn.microsoft.com/en-us/library/windows /desktop/aa394323(v=vs.85).aspx
4)你也可以使用性能指标,从这里开始: http:/ /www.codeproject.com/Articles/29986/A-Simple-Performance-Counter-Application
Hi,
Is there any way by means of which we can determine the network useage by IE using C#.
Any API that we can use to do the need fulfilled or any sample code will do.
Regards,
Ayush Jain
解决方案
You have several options:
1) There is the API of Microsoft Network Monitor (Network Monitor API[^])that you could use. It is installed as part of the application and there is aNetmonAPI.cs
also, that contains all definitions. You might find some samples out there.
2) If you are interested in http traffic only, you can build a http proxy. Start here: http://www.codeproject.com/Articles/93301/Implementing-a-Multithreaded-HTTP-HTTPS-Debugging
3) You can access process data via WMI: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394323(v=vs.85).aspx
4) You can also use performance counters, start here: http://www.codeproject.com/Articles/29986/A-Simple-Performance-Counter-Application
这篇关于如何使用C#监视IE进程的网络使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文