Results 1 to 3 of 3

Thread: IP Hunter

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    I have a LAN with a few PC's and PLC's on the network.

    The PLC's are a dedicated Controller with no names/drives etc... associated with them.

    I would like to know if it is possible to retrieve all IP address's on a given network.

    Thanks,

    Steve.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    Test it:

    How to display networked computers in a list box http://smalig.tripod.com/vb/119902.html

    How to get an IP Address http://smalig.tripod.com/vb/109908.html

    You must modify GetIPHostName() function from last sample.

    ------------------
    Public Function GetIPHostName(sHostName$) As String

    If Not SocketsInitialize() Then
    GetIPHostName = ""
    Exit Function
    End If

    GetIPHostName = Left$(sHostName, InStr(sHostName, Chr(0)) - 1)
    SocketsCleanup

    End Function

    And call:

    MsgBox "IP is " & GetIPHostName(Name_your_other_PC)
    ------------------

    Best regards.

    ------------------
    smalig
    smalig@hotmail.com
    smalig.tripod.com

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    Thanks Smalig,

    I've looked at the code and it seems to rely on being given the PC Name in order to return the IP address.

    The other example lists all PC Names on the network. This would be fine except that not all machines on the network are PC's and therefore don't have a name (Well that I know of or that gets listed in by this code).

    I need something similar to the example that lists all PC Names, except that it lists all used (or in use) IP address's on the network.

    Thanks again,

    Steve.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width