Ver Mensaje Individual
  #9  
Antiguo 03-11-2017
rdaniel2000 rdaniel2000 is offline
Miembro
 
Registrado: jun 2003
Posts: 11
Reputación: 0
rdaniel2000 Va por buen camino
Cita:
Empezado por Casimiro Notevi Ver Mensaje
.
Yo uso lo mismo con una pequeña variación y funciona perfectamente:
Código Delphi [-]
function getIPnumber: string;
const
  _MAXSIZE_ = 48;
var
  buffer:Array [0.._MAXSIZE_+1] of char;
  PuntHost: PHostEnt;
  wVersionRequested: WORD;
  wsaData: TWSAData;
begin
  Result := '';
  wVersionRequested := MAKEWORD( 1, 1 );
  WSAStartup( wVersionRequested, wsaData );
  GetHostName( @buffer, _MAXSIZE_ );
  PuntHost := GetHostByName( @buffer );
  Result := iNet_ntoa( PInAddr( PuntHost^.h_addr_list^ )^ );
  WSACleanup;
end;
Ya use tu codigo y me vuelve a marcar el mismo error de Excepcion...

Por ese motivo, yo creo que debe ser un problema en el Build del Windows Server... ya que cuando lo ejecuto en Windows 7, 10 o 2012 Server funciona muy bien...
Responder Con Cita