get The local Mac Address
发表于:2007-06-30来源:作者:点击数:
标签:
Dim mc As ManagementClass
Dim moc As ManagementObjectCollection
Dim mo As ManagementObject
mc = New ManagementClass("Win32_NetworkAdapterConfiguration")
moc = mc.GetInstances() @# Get all
.network adapter instances
For Each mo In moc
If mo.Item("IPEnabled") = True Then
TextBox1.Text = mo.Item("MacAddress").ToString()
End If
mo.Dispose()
Next
原文转自:http://www.ltesting.net