BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help on get the ip

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
paolol
Guest





PostPosted: Thu Sep 15, 2005 12:34 pm    Post subject: help on get the ip Reply with quote



Hi any one know how I can get all the IP number from a PC ??
Thanks,
Paolol.
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Sep 16, 2005 2:37 am    Post subject: Re: help on get the ip Reply with quote




"paolol" <paolol (AT) _nospam_salsan (DOT) net> wrote

Quote:
Hi any one know how I can get all the IP number from a PC ??

Assuming you are using WinSock directly, then look at gethostname() and
gethostbyname(). gethostbyname() will return all of the available IP
addresses.


Gambit



Back to top
paolol
Guest





PostPosted: Fri Sep 16, 2005 9:41 am    Post subject: Re: help on get the ip Reply with quote



Remy Lebeau (TeamB) ha scritto:
Quote:
"paolol" <paolol (AT) _nospam_salsan (DOT) net> wrote in message
news:43296a08 (AT) newsgroups (DOT) borland.com...

Hi any one know how I can get all the IP number from a PC ??


Assuming you are using WinSock directly, then look at gethostname() and
gethostbyname(). gethostbyname() will return all of the available IP
addresses.


Gambit


Thanks Gambit,

but I'm still lost Sad
I create the socket
Socket:=TCustomWinSocket.Create(1);
But then I don't see the method you mention.
Can you please explain a bit more how to do ?
Thanks a lot.
Paolol

Back to top
Francois Piette [ICS & Mi
Guest





PostPosted: Fri Sep 16, 2005 11:41 am    Post subject: Re: help on get the ip Reply with quote

Quote:
Hi any one know how I can get all the IP number from a PC ??

Easy !
Start a new project, add WSocket to the uses clause.
Drop a TMemo on the form.
Drop a TButton on the form
Add this event handler:

procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Lines := WSocket.LocalIPList;
end;

Compile, run, click on the button.
That's it.

BTW: WSocket unit is part of ICS. Download freeware and full source code
from http://www.overbyte.be

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[email]francois.piette (AT) overbyte (DOT) be[/email]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be




Back to top
paolol
Guest





PostPosted: Fri Sep 16, 2005 2:11 pm    Post subject: Re: help on get the ip Reply with quote

Francois Piette [ICS & Midware] ha scritto:
Quote:
Hi any one know how I can get all the IP number from a PC ??


Easy !
Start a new project, add WSocket to the uses clause.
Drop a TMemo on the form.
Drop a TButton on the form
Add this event handler:

procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Lines := WSocket.LocalIPList;
end;

Compile, run, click on the button.
That's it.

BTW: WSocket unit is part of ICS. Download freeware and full source code
from http://www.overbyte.be

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[email]francois.piette (AT) overbyte (DOT) be[/email]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be



Thanks Francois,

nice to see you here Smile
That was easy :)

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Sep 19, 2005 7:53 am    Post subject: Re: help on get the ip Reply with quote


"paolol" <paolol (AT) _nospam_salsan (DOT) net> wrote


Quote:
I create the socket
Socket:=TCustomWinSocket.Create(1);
But then I don't see the method you mention.

As per my earlier message:

"Assuming you are using WinSock directly"

Obviously, you are not using the WinSock API directly, so what I described
to you does not apply to TCustomWinSocket.

Quote:
Can you please explain a bit more how to do ?

The native VCL has no provisions for what you are asking for. You need to
access the WinSock API directly. Or else use a different component library
that implements what you are looking for. Indy (http://www.indyproject.org)
and ICS (http://www.overbyte.be) both have means of querying the list you
are seeking (amongst doing many other things).


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.