Author | Topic: IP Address | |
---|---|---|
LG | IP Address on Sat, 23 Mar 2002 07:10:02 +0100 How can I retreive the IP-Address (in usual form xxx.xxx.xxx.xxx) of my machine where I'm executing an HTTP server written in xBase (using ASINET). I tried to use SocketGetHostByName(SocketGetHostName()) but I receive an array like this {notebook1, {}, 2, 4, {-784804395}}. Probably there is a function to convert the 4th element of the returned array? Any help will be really appreciated. Lorenzo | |
Gernot Trautmann | Re: IP Address on Mon, 25 Mar 2002 10:02:16 +0100 Hi Lorenzo, I think you need SocketInetNtoA(), right? Regards, Gernot Trautmann Alaska Software Technology AG ------------------------------------------------------------- Technical Support EMEA: mailto:support@de.alaska-software.com Technical Support APRA: mailto:support@us.alaska-software.com News Server: news://news.alaska-software.com Home Page: http://www.alaska-software.com ------------------------------------------------------------- | |
Hubert Brandel | Re: IP Address on Tue, 14 May 2002 17:39:09 +0100 Hi, the function is SocketInetNtoA(), but you have to notice, that the IP_Adress 4. parameter is an Array in an Array ! ( I needed some time ) Of course you should use the DEFINES instead of a number: SocketInetNtoA(SocketGetHostByName(SocketGetHostName())[HOSTINFO_ADDR,1]) Bye Hubert LG schrieb: > > How can I retreive the IP-Address (in usual form xxx.xxx.xxx.xxx) of my > machine where I'm executing an HTTP server written in xBase (using ASINET). > I tried to use SocketGetHostByName(SocketGetHostName()) but I receive an > array like this {notebook1, {}, 2, 4, {-784804395}}. Probably there is a > function to convert the 4th element of the returned array? > Any help will be really appreciated. > Lorenzo |