Как на Delphi преобразовать IPAddres(LongInt) в привычное xxx.xxx.xxx.xxx?
Написал Ярослав Гасов   
13.01.2003

Share this!

Указываем в uses модуль WinSock. Пишем следующую функцию:

 

 

function Ip2String(Ip_address:longint):string;
begin
  ip_address:=winsock.ntohl(ip_address);
  result:= inttostr(ip_address shr 24)+'.'+
           inttostr((ip_address shr 16) and $ff)+'.'+
           inttostr((ip_address shr 8) and $ff)+'.'+
           inttostr(ip_address and $ff);
  end;

 

Источник: Dmitry Zauzolkov