不用这么麻烦吧
var
temp:string;
begin
temp:='c:\temp.txt';
if fileexists(temp) then
deletefile(temp);
winexec('command.com /c ping '+host+'>'+temp),sw_hide);
if not filexists(temp) then
sleep(1000);
try
memo1.lines.loadfromfile(temp)
except
end;
end;
var
temp:string;
begin
temp:='c:\temp.txt';
if fileexists(temp) then
deletefile(temp);
winexec('command.com /c ping '+host+'>'+temp),sw_hide);
if not filexists(temp) then
sleep(1000);
try
memo1.lines.loadfromfile(temp)
except
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货