如何用VB实现ARP命令的功能?

解决方案 »

  1.   

    我现在利用函数可以实现arp -a的功能了!
      

  2.   

    Private Declare Function WSAStartup Lib "wsock32" (ByVal VersionReq As Long, WSADataReturn As WSADATA) As Long
    Private Declare Function WSACleanup Lib "wsock32" () As Long
    Private Declare Function inet_addr Lib "wsock32" (ByVal s As String) As Long
    Private Declare Function gethostbyaddr Lib "wsock32" (haddr As Long, ByVal hnlen As Long, ByVal addrtype As Long) As Long
    Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (xDest As Any, xSource As Any, ByVal nbytes As Long)
    Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (lpString As Any) As LongPrivate Declare Function SendARP Lib "iphlpapi.dll" (DestIP As Long, SrcIP As Long, pMacAddr As Any, PhyAddrLen As Long) As Long