vb.net读取mac,vbnet读取文件内容-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

vb.net读取mac,vbnet读取文件内容

怎么用vb.net获取无线网络的MAC地址

你可以使用WMI来获取MAC ID。。加上一些特定的条件也可以实现获取WLAN MAC_ID

余姚ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:13518219792(备注:SSL证书合作)期待与您的合作!

vb.net获取本地连接的mac地址

Private Sub Form_Load()

Dim strComputer As String

Dim objWMI As Object

Dim colIP As Object

Dim IP As Object

Dim I As Integer

strComputer = "."

Set objWMI = GetObject("winmgmts://" strComputer "/root/cimv2")

Set colIP = objWMI.ExecQuery _

("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

For Each IP In colIP

If Not IsNull(IP.IPAddress) Then

For I = LBound(IP.IPAddress) To UBound(IP.IPAddress)

MsgBox "IP地址:" IP.IPAddress(I) Chr(10) _

"网卡类型:" IP.Description(I) Chr(10) _

"网卡地址:" IP.Macaddress(I)

Next

End If

Next

End Sub

用vb.net如何取得mac地址?

这是C#的,你可以转换一下

using System.Management;

//获取网卡的系列号

private static string GetMacAddress()

{

string ret = "";

try

{

ManagementClass cimobject = new ManagementClass("Win32_NetworkAdapterConfiguration");

ManagementObjectCollection moc = cimobject.GetInstances();

if (moc.Count == 0)

return "";

else

{

foreach (ManagementObject mo in moc)

{

if ((bool)mo["IPEnabled"] == true)

{

ret = (string)mo.Properties["MacAddress"].Value;

break;

}

}

}

}

catch

{

ret = "";

}

return ret;

}


网页题目:vb.net读取mac,vbnet读取文件内容
本文路径:http://kswsj.cn/article/hdoojh.html

其他资讯