how can i get the mac - adress from another ip-address in the local network? i am using vb.net and i already know the function sendARP, but i want to solve this problem with the windows api.
can anybody tell me, wich api-functions i have to use?
karkarotto
09-08-2005 at 08:52 AM
|
humberto Level: VB Lord Registered: 13-01-2005 Posts: 246
i already know this code. but i think it's not working in vb.net...
maybe you can help me
karkarotto
10-08-2005 at 06:42 AM
|
humberto Level: VB Lord Registered: 13-01-2005 Posts: 246
Re: get macaddress from ip
Try
System.Management
Dim mc As System.Management.ManagementClass
Dim mo As ManagementObject
mc = New ManagementClass("Win32_NetworkAdapterConfiguration")
Dim moc As ManagementObjectCollection = mc.GetInstances()
For Each mo In moc
If mo.Item("IPEnabled") = True Then
MsgBox("MAC address " & mo.Item("MacAddress").ToString())
End If
Next