FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour internet ip address
Posts: 1279
Joined: Mon Feb 06, 2006 04:28 PM
internet ip address
Posted: Wed Nov 14, 2007 10:33 AM
Antonio Linares wrote:José,

   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... }
     [   2] = N   2


Antonio,
Verdaderamente, no entiendo, yo lo pruebo en mi equipo y me devuelve la IP pública, lo he verificado con "MyIP.es" y el resultado es el mismo.

Quisieras por favor probar el exe que te envío junto con el código fuente correspondiente?

http://www.mediafire.com/?5wd1bu19cdk

Gracias desde ya.
Saludos/Regards,

José Murugosa

"Los errores en programación, siempre están entre la silla, el teclado y la IA!!"
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
internet ip address
Posted: Wed Nov 14, 2007 10:34 AM

Jose,

Probado tu EXE y el mismo error :-(

En Vista 32

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1279
Joined: Mon Feb 06, 2006 04:28 PM
internet ip address
Posted: Wed Nov 14, 2007 10:39 AM
Antonio Linares wrote:Jose,

Probado tu EXE y el mismo error :-)

En Vista 32


En XP el resultado es este:



Serán diferencias entre sistemas operativos?
Saludos/Regards,

José Murugosa

"Los errores en programación, siempre están entre la silla, el teclado y la IA!!"
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
internet ip address
Posted: Wed Nov 14, 2007 11:19 AM

Posiblemente...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
internet ip address
Posted: Wed Nov 14, 2007 11:48 AM
Richard Chidiak wrote:Antonio,

Unfortunately all the samples above retreive the Local ip code not the internet one


No, my sample retrieve the public IP.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
internet ip address
Posted: Wed Nov 14, 2007 11:57 AM

Enrico,

Do you use a router ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
internet ip address
Posted: Wed Nov 14, 2007 01:45 PM

No, just a modem. Anyway, maybe the difference is XP vs. Vista. :-(

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
internet ip address
Posted: Wed Nov 14, 2007 02:01 PM

Enrico,

>No, just a modem. Anyway, maybe the difference is XP vs. Vista.

I am using XP Pro and a router. aHosts has a length of 1 and aHosts[1] returns my local IP address not my interent IP address.

It must be that your function only works without a router.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
internet ip address
Posted: Wed Nov 14, 2007 04:10 PM

Yes, thats my guess, that the function is only valid with a modem, not with a router

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1279
Joined: Mon Feb 06, 2006 04:28 PM
internet ip address
Posted: Wed Nov 14, 2007 04:13 PM
Antonio Linares wrote:Yes, thats my guess, that the function is only valid with a modem, not with a router


Probably that is the reason becouse I use a modem too.
Saludos/Regards,

José Murugosa

"Los errores en programación, siempre están entre la silla, el teclado y la IA!!"
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
internet ip address
Posted: Thu Nov 15, 2007 12:09 AM
Antonio Linares wrote:Yes, thats my guess, that the function is only valid with a modem, not with a router

Antonio and all fws,
I use a router and Vista business.
The Enrico's function return 3 addresses:
1) my local ip address 192.168.2.100
2) my local ip address 192.168.147.1
3) my local ip address 192.168.172.1

Only the Otto's function return the external IP

With the router, i think that is not present the external ip on the computer.
Ciao, best regards,

Ugo
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
internet ip address
Posted: Thu Nov 15, 2007 08:54 AM
Ugo wrote:Only the Otto's function return the external IP


Where is the Otto's function? I can't find it in this thread.

EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
internet ip address
Posted: Thu Nov 15, 2007 12:18 PM

I tested Mr. EMG's code.

When my pc has two ip addresses, which i can see with ipconfig /all, the funtion returns two element array with two ip addresses.

when ipconfig /all shows only one ip address it returns one element array only

Regards



G. N. Rao.

Hyderabad, India
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
internet ip address
Posted: Thu Nov 15, 2007 08:50 PM
EnricoMaria wrote:
Ugo wrote:Only the Otto's function return the external IP

Where is the Otto's function? I can't find it in this thread.

I'm sorry, I was wrong is the function of Richard Chidiak
Ciao, best regards,

Ugo