就是Win2k下的arp -d命令完成的功能。
我只知道好像和iphlpapi有关。具体怎么用就不知道了,烦请高人指点。

解决方案 »

  1.   

    查看MSDN,IP Helper Fucntion
      

  2.   

    MSDN上是这么说的:
    DeleteIpNetEntryThe DeleteIpNetEntry function deletes an ARP entry from the ARP table on the local computer.
    DWORD DeleteIpNetEntry(
      PMIB_IPNETROW pArpEntry
    );Parameters
    pArpEntry 
    [in] Pointer to a MIB_IPNETROW structure. The information in this structure specifies the entry to delete. The caller must specify values for at least the dwIndex and dwAddr members of this structure. 
    Return Values
    If the function succeeds, the return value is NO_ERROR.其中PMIB_IPNETROW是这么一个结构体:
    typedef struct _MIB_IPNETROW {
      DWORD dwIndex;
      DWORD dwPhysAddrLen;
      BYTE bPhysAddr[MAXLEN_PHYSADDR];
      DWORD dwAddr;  DWORD dwType;
    } MIB_IPNETROW, *PMIB_IPNETROW;那我在Delphi中该如何声明和使用呢?
      

  3.   

    这个是获取信息的
    GetIpStatisticsThe GetIpStatistics function retrieves the IP statistics for the current computer.
    DWORD GetIpStatistics(
      PMIB_IPSTATS pStats
    );Parameters
    pStats 
    [out] Pointer to a MIB_IPSTATS structure that receives the IP statistics for the local computer. 
    Return Values
    If the function succeeds, the return value is NO_ERROR.If the function fails, use FormatMessage to obtain the message string for the returned error.ResWindows Server 2003 and Windows XP:  Use the GetIpStatisticsEx function to obtain the IP statistics for the IPv6 protocol.
    Requirements
    Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0 SP4 and later, Windows Me, and Windows 98.
    Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server 4.0 SP4 and later.
    Header: Declared in Iphlpapi.h.
    Library: Use Iphlpapi.lib.
    See Also
    IP Helper Start Page, IP Helper Function Reference, GetIcmpStatistics, GetTcpStatistics, GetUdpStatistics, MIB_IPSTATS