Re: get your external IP
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon May 06, 2024 3:11 am
by Enrrique Vertiz
Greetings, question and how will the IPV4 be obtained?
Thank you
Re: get your external IP
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon May 06, 2024 3:51 am
by Enrrique Vertiz
Saludos Antonio
Para obtener la direccion IP local utilizo: GetHostByName( GetHostName() ) y en Win10 funcion Ok, el resultado lo comprado con IpConfig y me da lo mismo.
Pero con Win11, me da un valor distinto al que me retorna IpConfig ... creo que algo ahi no esta Ok ...
Gracias
Re: get your external IP
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon May 06, 2024 4:43 am
by anserkk
I am using Windows 11 Pro, Version 23H2
I am getting the local IP via GetHostByName( GetHostName() )
Re: get your external IP
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon May 06, 2024 8:09 am
by nageswaragunupudi
- Code: Select all Expand view
GetHostByName( GetHostName() )
gives us the local IP of our PC in the Local Area Network.
Not the Public IP of our router
Re: get your external IP
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon May 06, 2024 8:25 am
by Antonio Linares
Fixed for Windows 11. Solucionado:
Se incluye en el próximo build de FWH
- Code: Select all Expand view
function LocalIP()
local cIP
WSASTARTUP()
cIP = GetHostByName( GetHostName() )
WSACLEANUP()
return cIP
Re: get your external IP
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Jun 03, 2024 8:39 am
by Silvio.Falconi
I allready Used
Function GetIP()
Local cVar1
WsaStartUp()
cVar1 := GetHostByName( GetHostName() )
WsaCleanUp()
return cVar1