

Public Shared Function SendARP(ByVal DestIP As Integer, ByVal SrcIP As Integer, _īyVal pMacAddr As Byte(), ByRef PhyAddrLen As Integer) As Integerĭim r As Integer = SendARP(CType(TempA.Address, Integer), 0, ab, len)ġ) _ - error - ExactSpelling is not declared
CONVERT MAC ADDRESS TO COLON WIN8 CODE
From the above code convertor I goty this. Please check the converted code as I have converted using three different convertors but still getting error.Īs I have already said that I have used Code converter but still getting errors. I have did this using code convertor but giving error on line - Dim r As Integer = SendARP(CType(TempA.Address, Long), 0, ab, len) - that Public Property Address is obsolete.Ĭan any please give me its equivalent code in vb.net. Tempaddr = CType(Dns.GetHostByName(sName), )ĭim TempAd As () = Tempaddr.AddressListĭim r As Integer = SendARP(CType(TempA.Address, Long), 0, ab, len)ĭim sMAC As String = BitConverter.ToString(ab, 0, 6) Public Function GetMacAddress(ByVal sName As String) As Stringĭim Tempaddr As = Nothing

Public Shared Function SendARP(ByVal DestIP As Long, ByVal SrcIP As Long, ByVal pMacAddr As Byte(), ByRef String sMAC = BitConverter.ToString( ab, 0, 6 ) Ĭonverted to VB.Net as follows but giving error. Int r = SendARP( (int) TempA.Address, 0, ab, ref len ) Public string GetMacAddress(string sName) Public static extern int SendARP( int DestIP, int SrcIP, byte pMacAddr, ref int PhyAddrLen ) Ok I got it working using a code written in C#, now I want to convert it to VB.net.
