| View previous topic :: View next topic |
| Author |
Message |
George Wei Guest
|
Posted: Thu Jan 29, 2004 11:58 pm Post subject: How to get the IP address of a machine in a LAN? |
|
|
Dear all,
How to get the IP address of a machine in a LAN? Thanks.
Regards,
George
|
|
| Back to top |
|
 |
Paul Nicholls Guest
|
Posted: Fri Jan 30, 2004 1:10 am Post subject: Re: How to get the IP address of a machine in a LAN? |
|
|
Are you talking about the IP address of another computer in a LAN that isn't
your own?
"George Wei" <nobody (AT) yahoo (DOT) com> wrote
| Quote: | Dear all,
How to get the IP address of a machine in a LAN? Thanks.
Regards,
George
|
|
|
| Back to top |
|
 |
George Wei Guest
|
Posted: Fri Jan 30, 2004 5:09 am Post subject: Re: How to get the IP address of a machine in a LAN? |
|
|
"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote in
news:4019aefa$1 (AT) newsgroups (DOT) borland.com:
| Quote: | Are you talking about the IP address of another computer in a LAN that
isn't your own?
|
Yes
|
|
| Back to top |
|
 |
CheshireCat Guest
|
Posted: Fri Jan 30, 2004 8:20 am Post subject: Re: How to get the IP address of a machine in a LAN? |
|
|
| Quote: | Are you talking about the IP address of another computer in a LAN that
isn't your own?
Yes
|
Hi George,
Can you explain more what you're trying to do
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004
|
|
| Back to top |
|
 |
Juan Rosell Guest
|
Posted: Fri Jan 30, 2004 8:58 am Post subject: Re: How to get the IP address of a machine in a LAN? |
|
|
Why don´t you try gethostbyname()?
regards,
Juan
"George Wei" <nobody (AT) yahoo (DOT) com> escribió en el mensaje
news:Xns94805B38666FCnobodyyahoocom (AT) 207 (DOT) 105.83.66...
| Quote: | Dear all,
How to get the IP address of a machine in a LAN? Thanks.
Regards,
George
|
|
|
| Back to top |
|
 |
George Wei Guest
|
Posted: Fri Jan 30, 2004 11:46 pm Post subject: Re: How to get the IP address of a machine in a LAN? |
|
|
"CheshireCat" <clah (AT) blah (DOT) com> wrote in
news:401a13de (AT) newsgroups (DOT) borland.com:
| Quote: | Can you explain more what you're trying to do
|
I want to know a machine, then use its IP address to connect to it. I
provide a GUI to let the user browse the network and choose a machine, it
returns the machine name. Then I have to cast the machine name to ip
address. gethostbyname needs a DNS name, not a machine name.
Regards,
George
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Jan 31, 2004 2:09 am Post subject: Re: How to get the IP address of a machine in a LAN? |
|
|
"George Wei" <nobody (AT) yahoo (DOT) com> wrote
| Quote: | I want to know a machine, then use its IP address to connect to it.
I provide a GUI to let the user browse the network and choose a
machine, it returns the machine name. Then I have to cast the
machine name to ip address. gethostbyname needs a DNS name,
not a machine name.
|
Did you actually try it yet, or are you just basing your statements on
documentation? gethostbyname() can return info for a computer name that is
on the same network. That is a "feature" of Microsoft's socket
implementation (aka WinSock).
Gambit
|
|
| Back to top |
|
 |
George Wei Guest
|
Posted: Mon Feb 02, 2004 6:38 am Post subject: Re: Problem solved, gethostbyname() works ok |
|
|
"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote in
news:401b0cc9$1 (AT) newsgroups (DOT) borland.com:
| Quote: | Did you actually try it yet, or are you just basing your statements on
documentation? gethostbyname() can return info for a computer name
that is on the same network. That is a "feature" of Microsoft's
socket implementation (aka WinSock).
|
I tried gethostbyname() again and it solved my problem. Thanks for all
replies for this problem.
Regards,
George
|
|
| Back to top |
|
 |
|