用Indy Client组件中的'idicmpclient'控件,源代码如下,一点问题都没有。 Icmp.Host:='192.168.49.3'; try Icmp.Ping; if Icmp.ReplyStatus.FromIpAddress='192.168.49.3' then begin dm1.sp1.StoredProcName :='mao_pi_jing_hf;1'; dm1.sp1.ExecProc ; end; except on e:exception do showmessage(e.Message+'网络通讯中断,请速通知调度.'); end;
ICS也有的
try
Icmp.Ping;
if Icmp.ReplyStatus.FromIpAddress='192.168.49.3' then
begin
dm1.sp1.StoredProcName :='mao_pi_jing_hf;1';
dm1.sp1.ExecProc ;
end;
except
on e:exception do
showmessage(e.Message+'网络通讯中断,请速通知调度.');
end;