这样调用的ICMP:
ICMP.OnReply := ICMPReply;
ICMP.ReceiveTimeout := 1000;
ICMP.Host := edtHost.Text;
ICMP.Ping;
Application.ProcessMessages;但是无规律的报:
Project ping.ext raisd exception class EIdIcmpException with message
'Non-echo type response received'.Process stopped.Use Step or Run to continue.
这个错误!请问是什么引起的这个错误呢?

解决方案 »

  1.   

    //ICMP.OnReply := ICMPReply;
    ICMP.ReceiveTimeout := 1000;
    ICMP.Host := edtHost.Text;
    ICMP.Ping;
    //Application.ProcessMessages;
    if icmp.ReplyStatus.BytesReceived>0 then
    //说明ping通了
    把那两行注释掉看看
      

  2.   

    procedure Tfm_ping.ping;
    var n:Integer;
    d:tdatetime;
    begin
            //self.ICMP.OnReply:=ICMPReply;
            ICMP.ReceiveTimeout := 1000;
            for n:=0 to self.ListView1.Items.Count-1 do
            begin
                    d:=now;
                    ICMP.Host := self.ListView1.Items.Item[n].SubItems.Strings[1];
                    m:=n;
                    self.ICMP.Ping;
                    //Application.ProcessMessages;                if ICMP.ReplyStatus.BytesReceived>0 then
                    begin
                            lstReplies.Items.Add(self.ListView1.Items.Item[m].SubItems.Strings[0]+'通'+datetimetostr(d));
                    end
                    else
                    begin
                            lstReplies.Items.Add(self.ListView1.Items.Item[m].SubItems.Strings[0]+'断'+datetimetostr(d));
                    end;        end;
    end;
    这样还是会出现那个错误!
      

  3.   

    其实这个空间的ping用法很简单的,你看看你的网络正常么,或者是ping的对象屏蔽了ping指令
      

  4.   

    网络是正常的!“ping的对象屏蔽了ping指令”这个有点不太明白!