Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/06/2007, 04:28
tecnicosht
 
Fecha de Ingreso: junio-2007
Ubicación: El mundo
Mensajes: 22
Antigüedad: 16 años, 11 meses
Puntos: 0
Re: Saber Ip del equipo

Imports System
Imports System.Net

Module Module1

Sub Main()
Dim strMachineName As String

'Get the Host Name
strMachineName = Dns.GetHostName()
Console.WriteLine("Host Name: " + strMachineName)

'Get the Host by Name
Dim ipHost As IPHostEntry
ipHost = Dns.GetHostByName(strMachineName)

'You can also query the DNS database for info on a
'website like web.com
'In that case replace the above line as:
'ipHost = Dns.GetHostByName("web.com")

'Get the list of addresses associated with the host in an array
Dim ipAddr() As IPAddress = ipHost.AddressList
Dim count As Integer

'Enumerate the IP Addresses
For count = 0 To ipAddr.GetUpperBound(0)
Console.Write("IP Addresses {0}: {1} ", count, _
ipAddr(count).ToString)
Next
End Sub

End Module