请教各位老师:这段代码执行报错。不能获取本机的MAC地址。请问是哪出错了?谢谢!
代码:Dim query As System.Management.ManagementObjectSearcher = New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration")
Dim queryCollection As System.Management.ManagementObjectCollection = query.Get()
Dim mo As New System.Management.ManagementObject
For Each mo In queryCollection
If IsDBNull(mo.Item("macaddress")) = False Then
If mo.Item("macaddress") <> "" Then
output.show(mo.Item("macaddress"))
End If
End If
Next
错误提示图如附件

