procedure TForm1.pingClick(Sender: TObject);
var
i: Integer;
begin
form1.ping.Enabled:=false;
IdIcmp.ReceiveTimeout:=200;
for i := 0 to Listbox1.Count - 1 do
begin
Application.ProcessMessages;
sleep(100);
IdIcmp.Host:=Listbox1.Items[i];
Listbox1.ItemIndex:=i;
IdIcmp.Ping;
idicmp.Free;
form1.ping.Enabled:=true;
//if stop then Break;
end;
end;
procedure TForm1.IdIcmpReply(ASender: TComponent;
const AReplyStatus: TReplyStatus);
begin
case AReplyStatus.ReplyStatusType of
rsEcho: Listbox2.Items.Add(IdIcmp.Host+' 成功 耗時(毫秒):'+inttostr(areplystatus.MsRoundTripTime));
rsError: Listbox2.Items.Add(IdIcmp.Host+' 錯誤 ');
rsTimeOut:Listbox2.Items.Add(IdIcmp.Host+' 超時 ');
rsErrorUnreachable:Listbox2.Items.Add(IdIcmp.Host+' 地址錯誤 ');
else
Listbox2.Items.Add(IdIcmp.Host+' 其他未知錯誤 ');
end;
Listbox2.ItemIndex:=Listbox2.Count-1;
end;
出錯提示

Listbox1.Items[i]里面有200多個IP地址
報錯如何處理呢
uj5u.com熱心網友回復:
提升用戶權限試下uj5u.com熱心網友回復:
10040錯誤 呵呵 。無解。低版本的indy無此問題。轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/72905.html
標籤:網絡通信/分布式開發
