Thread View: borland.public.cppbuilder.internet.web
2 messages
2 total messages
Started by alan
Thu, 20 Jul 2006 20:15
how do you find out what your ip address is?
Author: alan
Date: Thu, 20 Jul 2006 20:15
Date: Thu, 20 Jul 2006 20:15
2 lines
832 bytes
832 bytes
There must be a function out in builder that will tell you what your computer ip address is.
Re: how do you find out what your ip address is?
Author: Remy Lebeau (TeamB)
Date: Thu, 20 Jul 2006 20:34
Date: Thu, 20 Jul 2006 20:34
25 lines
1910 bytes
1910 bytes
"alan" <alan@overthere.com> wrote in message news:44bfe452$1@newsgroups.borland.com... > There must be a function out in builder that will tell > you what your computer ip address is. There is nothing in Builder itself for that. You have to go to the Win32 API for it. You have two choices: 1) gethostname() and gethostbyname(). Look in the h_addr_list member of the hostent structure that gethostbyname() returns. 2) GetAdaptersInfo(). Look at the IpAddressList member of the IP_ADAPTER_INFO structure that it returns. Note, however, that these can only return the IP address(es) that are assigned directly to the machine. If your machine is on a network, and the Internet address is assigned to a router or to another machine that has Internet Connection Sharing enabled, then you will not be able to obtain the Internet IP address directly. You will have to query an external server, such as by sending an HTTP request to http://iplookup.flashfxp.com. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads