Advertisement
Advertisement
| 05.21.2008 at 03:43AM PDT, ID: 23420225 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
Private Sub GetNetworkInformation()
Dim IP As String = String.Empty
'// Only proceed if there is a network availible
If NetworkInterface.GetIsNetworkAvailable Then
'// Get the set of all NetworkInterface objects for the local machine
Dim interfaces As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces
'// Iterate through the interfaces
For Each ni As NetworkInterface In interfaces
m_InterfaceNames.Add(ni.Name)
'// Iterate through the current interface (ni)
For Each addr As UnicastIPAddressInformation In ni.GetIPProperties.UnicastAddresses
m_IpAddresses.Add(addr.Address)
Next
Next
End If
End Sub
|