Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB7
Expertise: Intermediate
Dec 9, 2002

GetLocalHostIpAddresses - Retrieving the array of IP addresses for the local host

' Return the array of IP addresses for the local host
' Note: Requires Imports System.Net
' Example:
'   Dim ipa As IPAddress
'   For Each ipa In GetLocalHostIpAddresses()
'      Debug.WriteLine(ipa.ToString())
'   Next
Function GetLocalHostIpAddresses() As IPAddress()
    Dim iphe As IPHostEntry = Dns.GetHostByName(Dns.GetHostName())
    Return iphe.AddressList()
End Function
Marco Bellinaso
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap