实现了。
function GetComputerName(IP:string):string;
var
HostEntHostEnt;
WSAData:TWSADATA;
AddrWORD;
begin
WSAStartup($101, WSAData);
Addr:=inet_addr(PChar(IP));
HostEnt:=gethostbyaddr(@Addr,sizeof(Addr),PF_INET);
Result:=HostEnt.h_name;
WSACleanup();
end;