Finding the mac address?

  • Thread starter Thread starter Magnus Persson
  • Start date Start date
M

Magnus Persson

Is there a .NET way of finding the mac address (or addresses if multiple
NICs) on Windows 98/Me?

/Magnus
 
Hello Magnus,

Thanks for your post. Please refer to the following VB .NET sample which
execute nbtstat command to get a list of MAC addresses:

Get Mac Address
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=391&lngW
Id=10

In addtion, you can also call NetBIOS APIs to get the MAC addresses from
your .NET app via P/Invoke:

HOWTO: Get the MAC Address for an Ethernet Adapter
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:
80/support/kb/articles/q118/6/23.asp&NoWebContent=1

Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconConsumingUnmanagedDLLFunctions.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top