sourceIP:192.168.1.101哪个函数可以检测出IP已经联网请大侠赐教!

解决方案 »

  1.   

    还真的忘了,以前好像用过,你去dephi盒子上找找,那上边应该有例子
      

  2.   

    引用WinInet,然后:
    if InternetGetConnectedState(nil, 0) then ShowMessage('可以连接Internet') 
      else ShowMessage('不能连接Internet');
      

  3.   

    var
      i:Integer;
      LinkContext:TIdContext;
    begin
      with idTCPServer.Contexts.LockList do
      try
        for i := Count-1 downto 0 do
          if TIdContext(Items[i]).Binding.PeerIP='192.168.1.101' then Showmessage('192.168.1.101在线');
      finally
        idTCPServer.Contexts.UnlockList;
      end;
    end;
      

  4.   

    用delphi实现ping对方的IP然后根据返回的数据包判断