|
-
Nov 9th, 1999, 02:44 PM
#1
Thread Starter
Lively Member
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.
-
Nov 9th, 1999, 03:54 PM
#2
Addicted Member
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
[email protected]
smalig.tripod.com
-
Nov 9th, 1999, 04:17 PM
#3
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|