borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How to say automatically \"OK\" when the prompt box \"Save as\" occurs ?)Next Topic (C++ to Vb) New Topic New Poll Post Reply
AndreaVB Forum : API : get macaddress from ip
Poster Message
karkarotto
Level: Trainee

Registered: 09-08-2005
Posts: 2

icon get macaddress from ip

hello

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
View Profile Send Email to User Show All Posts Visit Homepage ICQ | Quote Reply
humberto
Level: VB Lord

Registered: 13-01-2005
Posts: 246
icon Re: get macaddress from ip


Check out these two links:


http://www.mvps.org/vbnet/index.html?code/network/macaddress.htm
http://www.mvps.org/vbnet/index.html?code/network/macaddressremote.htm

09-08-2005 at 09:57 AM
View Profile Send Email to User Show All Posts | Quote Reply
karkarotto
Level: Trainee

Registered: 09-08-2005
Posts: 2
icon Re: get macaddress from ip

hello

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
View Profile Send Email to User Show All Posts Visit Homepage ICQ | Quote Reply
humberto
Level: VB Lord

Registered: 13-01-2005
Posts: 246
icon Re: get macaddress from ip



Try
System.Management




        Dim mc As System.Management.ManagementCl­ass
        Dim mo As ManagementObject
        mc = New ManagementClass("Win32_Network­AdapterConfiguration")
        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


10-08-2005 at 10:43 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : API : get macaddress from ip
Previous Topic (How to say automatically \"OK\" when the prompt box \"Save as\" occurs ?)Next Topic (C++ to Vb) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder