IP local de um PC

IP local de um PC

Postby MGA » Sat Mar 23, 2019 3:15 pm

Olá,

alguem teria uma função que retorne o IP local de um PC?

Image
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1249
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: IP local de um PC

Postby FranciscoA » Sat Mar 23, 2019 3:27 pm

Hola. Intenta con esto:
Code: Select all  Expand view
//---------------//Conocer IP del ordenador
Function GetIP()
local cIP

   WsaStartUp()

   cIP := GetHostByName( GetHostName() )   //IP equipo local

   WsaCleanUp()

Return cIP

Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: IP local de um PC

Postby MGA » Mon Mar 25, 2019 11:23 am

Francisco,

muito obrigado, funciona perfeitamente! :D
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1249
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: IP local de um PC

Postby FranciscoA » Mon Mar 25, 2019 6:11 pm

Me alegra que te haya sido de utilidad.
Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests