uses winsock
function GetIpAddress: string;
var
  wVersionRequested: WORD;
  wsaData: TWSAData;
  p: PHostEnt;
  s: array[0..128] of Char;
begin
  wVersionRequested := MAKEWORD(1, 1);
  WSAStartup(wVersionRequested, wsaData);
  try
    GetHostName(@s, 128);
    p := GetHostByName(@s);
    {Get the IpAddress}
    Result := StrPas(iNet_ntoa(PInAddr(p^.h_addr_list^)^));
  finally
    WSACleanup
  end
end;function GetTheComputerName: string;
var
  ComputerName: array [0..MAX_COMPUTERNAME_LENGTH] of Char;
  nSize: DWORD;
begin
  nSize := MAX_COMPUTERNAME_LENGTH;
  FillChar(ComputerName, MAX_COMPUTERNAME_LENGTH, 0);
  GetComputerName(ComputerName, nSize);
  Result := ComputerName
end;