如何在vb.net中获取所有网络信息 [英] How To Get All Network Information in vb.net
本文介绍了如何在vb.net中获取所有网络信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想制作一个旨在完成此类任务的网络计划..
显示所有网络接口[如以太网, wifi] Twith有IP。
显示活动或禁用状态
如果任何接口处于活动状态则< br $>
上传或下载bit / s
显示目前有多少应用程序正在使用互联网..
以及我们如何阻止其他应用程序上网..
..
关心
I Want TO Make A Network Program Which Is Intended To Such Task..
Show All Network Interface [like ethernet ,wifi] Twith there IP.
Show Active Or Disable State
if any interface is Active Then
Upload or Download bit/s
Show how many Application is currently using Internet..
And How we block to another application to Internet access..
..
Regards
推荐答案
你想要看看Cassia .Net我用它来做类似的项目。您可以从这里下载源代码,
https:// code.google.com/p/cassia/ [ ^ ]
您将不得不使用它来获取传入的传出字节,但它可以工作且非常简单。
Your gonna want to look into Cassia.Net i used this for a similar project. You can download the source code from here,
https://code.google.com/p/cassia/[^]
You going to have to play with it a bit to get incoming outgoing bytes but it works and it pretty simple.
Private Sub getinterfaces()
Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces
If nics.Length < 0 Or nics Is Nothing Then
MsgBox("No NICS")
Exit Sub
End If
IntLists.Items.Clear()
For Each netadapter As NetworkInterface In nics
Dim intproperties As IPInterfaceProperties = netadapter.GetIPProperties()
IntLists.Items.Add(netadapter.Name)
Next
End Sub
这篇关于如何在vb.net中获取所有网络信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文