I have code that retrieves all MAC addresess:
But how can I extract only the local address?Code:Dim NICs As System.Net.NetworkInformation.NetworkInterface() = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() Dim s As String = "" For i As Integer = 0 To NICs.Length - 1 s &= String.Format("{0}'s MAC address is: {1}", NICs(i).Name, NICs(i).GetPhysicalAddress()) & vbNewLine Next TextBox1.Text = s
For example, I take a Wireless adapters` MAC addres, generate a serial number, and the user disables wifi, and then I wont be able to retrieve the MAC in my application and validate the serial number generated form the wifi MAC.




Reply With Quote