Retrieving the MAC address?

T

Thomas Due

We currently use a method for retrieving a MAC address in which we use
the "SendARP" method from the "iphlpapi.dll" library.

As we have understod it, this method is actually deprecated, and
unstable. So the question is:

How do we retrieve the MAC address for any or all NIC on a PC?
And do we make sure that it is correct?
How do we make it work, even if disconnected from a network?

If there isn't a NIC available, there is of course no MAC address, but
any modern computer has a NIC as default, so we're not worried about
not having a NIC available.

We are currently using C# 1.1, but will switch to 2.0 when released.

TYI

--
Thomas Due
Posted with XanaNews version 1.17.5.9

"The visionary lies to himself, the liar only to others."
-- Friedrich Nietzsche
 
¿

¿ Mahesh Kumar

Hi Thomas.

(1) How do we retrieve the MAC address for any or all NIC on a PC?
http://www.codeproject.com/csharp/Host_Info_within_Network.asp - for all NIC
on a PC and Network
http://msdn2.microsoft.com/library/xt4877f8(en-us,vs.80).aspx -Supported in
Framework 2.0 [ MSDN2 - for VS 2005 beta]

(2) And do we make sure that it is correct?
Through Network command...
Run > cmd > type ipconfig/all [ this you can use it for checking or
verification]

(3) How do we make it work, even if disconnected from a network?
I tried and checked its not working....i mean i disabled my LAN and tried
IPCONFIG /All - so no idea about this more

Reply me if you want anything specifically in MAC.

Maheshkumar.R
http://spaces.msn.com/members/cyberiafreak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top