devxlogo

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

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())'   NextFunction GetLocalHostIpAddresses() As IPAddress()    Dim iphe As IPHostEntry = Dns.GetHostByName(Dns.GetHostName())    Return iphe.AddressList()End Function

devx-admin

Share the Post: