I think I posted this before but just in case anybody forgot <g> ...
The MS Winsock control only gives 1 IP#. If you have multiple adapters (say 2 NICs or 1 NIC and an internet connected Modem, etc.) then that control gives you just one of them. (there's no telling which one it will give you although it tends to give you the same one over and over) There are two reliable ways of getting the IP# of the adapter that you want that I'm aware of right now. One is to run the ipconfig command (at least in NT/W2K) and parse out what you want. The second is to look in the registry. All adapters and their IP#'s are stored there. Why can't MS just give us the option of selecting which adapter we want to use in the gethostbyname() (I think that's the Win32 function?) call ? I dunno.
Hope this helps somebody
- A Hilton
>The easiest way I know of is to use the MS Winsock control.
>
>ows = createobject("MSWinsock.Winsock")
>? ows.LocalIP
>
>This is for local IP addresses only.
>
>>How do you get the IP address of the local machine?
>>
A Hilton
Software & Technology Development,
Programming & Business Process Consulting