View Single Post
  #9 (permalink)  
Old 03-10-2009, 11:44 PM
alienation alienation is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Mar 2009
Posts: 6
Reputation: 0
alienation is on a distinguished programming path ahead
Cool

Quote:
Originally Posted by _powerade_ View Post
Hi, try this:

Code:
Imports System.Net
Code:
Dim hostNameOrAddress As String = YourIPadress
Dim returnValue As IPHostEntry

Try
   returnValue = Dns.GetHostEntry(hostNameOrAddress)

   MessageBox.Show(returnValue.HostName())

Catch ex As Exception
   MessageBox.Show(ex.Message)

End Try


thanks for your reply. unfortunately, when i tried this code that you had given, it only returns the given ip address. what i needed is that, if that ip address was assigned to a, for example, a network printer or a router, it will display, either the name of the router or some kind of description.

thanks anyway for the reply. it will be of useful future reference.
__________________
"...THe TeLePHoNe NuMBeR u DiaLLeD iS UnDeRGRouND... PLeaSe TRY uR CaLL NeVeR..."
Reply With Quote