[求助]看看这个出了什么问题了
procedure TForm1.gethostbynameClick(Sender: TObject);
var
cr:string;
err:integer;
host:hostent;
op:pchar;
begin
host:=gethostbyname(pchar(edit1.Text));
except
if host=NIL then
begin
edit2.Text:='host does not exit';
exit;
end;
cr:=copy('host.h_addr',4,0 );
edit3.Text:=format('%d.%d.%d.%d',[ord(cr[1]),ord(cr[2]),ord(cr[3]),ord(cr[4])]);
edit2.Text:=host.h_name;
end;