Ver Mensaje Individual
  #2  
Antiguo 12-04-2006
Avatar de Bicho
[Bicho] Bicho is offline
Miembro Premium
 
Registrado: jul 2003
Ubicación: Inca - Mallorca
Posts: 1.776
Reputación: 22
Bicho Va por buen camino
Prueba esto a ver que tal:

Código Delphi [-]
function GetIP : String;
var p : PHostEnt;
    s : array[0..128] of char;
    wVersionRequested : WORD;
    wsaData : TWSAData;
begin
  wVersionRequested := MAKEWORD(1, 1);
  WSAStartup(wVersionRequested, wsaData);
  GetHostName(@s, 128);
  p := GetHostByName(@s);
  Result := iNet_ntoa(PInAddr(p^.h_addr_list^)^);
  WSACleanup;
end;

Saludos
Responder Con Cita