Home All Groups Group Topic Archive Search About

How to get the MAC address?

Author
12 Jun 2009 6:08 PM
Allan Michaels
Hello,

I need to get the MAC address of our network card using a C# call from our
software.

How should I proceed?

Thank you in advance for your help.

--
Allan Michaels
Ann Arbor, MI

Author
12 Jun 2009 6:12 PM
Mark Rae [MVP]
"Allan Michaels" <allanm@newsgroup.nospam> wrote in message
news:6DD05EA1-8DA6-4E81-8060-D45A63BF039F@microsoft.com...

> I need to get the MAC address of our network card using a C# call from our
> software.

http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q="C%23"+WMI+MAC+address


--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Are all your drivers up to date? click for free checkup

Author
15 Jun 2009 6:44 AM
Steven Cheng
Hi Allan,

As Mark has suggested, you can use .NET code(C#) to query MAC address
through the WMI programing interface. Here is another article mentioned
this:

http://cshark.wordpress.com/2009/05/28/how-to-get-mac-address-of-a-system-in
-c/

Also, there are many reference on directly using WIN32 api to get the
network information(include MAC):

#How To Get the MAC Address for an Ethernet Adapter
http://support.microsoft.com/kb/118623

#Extracting MAC Addresses Programmatically
http://www.osix.net/modules/article/?id=433

For .net, you can also use interop to call win32 api or unmanaged
functions(from an unmanaged dll).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

--------------------
Show quoteHide quote
>From: =?Utf-8?B?QWxsYW4gTWljaGFlbHM=?= <allanm@newsgroup.nospam>
>Subject: How to get the MAC address?
>Date: Fri, 12 Jun 2009 11:08:01 -0700

>
>Hello,
>
>I need to get the MAC address of our network card using a C# call from our
>software.
>
>How should I proceed?
>
>Thank you in advance for your help.
>
>--
>Allan Michaels
>Ann Arbor, MI
>
Author
23 Jun 2009 3:48 AM
Steven Cheng
Hi Allan,

Have you got any progress on this issue?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

Show quoteHide quote
>From: stch***@online.microsoft.com ("Steven Cheng")
>Organization: Microsoft
>Date: Mon, 15 Jun 2009 06:44:31 GMT
>Subject: RE: How to get the MAC address?

>Hi Allan,
>
>As Mark has suggested, you can use .NET code(C#) to query MAC address
>through the WMI programing interface. Here is another article mentioned
>this:
>
>http://cshark.wordpress.com/2009/05/28/how-to-get-mac-address-of-a-system-i
n
>-c/
>
>Also, there are many reference on directly using WIN32 api to get the
>network information(include MAC):
>
>#How To Get the MAC Address for an Ethernet Adapter
>http://support.microsoft.com/kb/118623
>
>#Extracting MAC Addresses Programmatically
>http://www.osix.net/modules/article/?id=433
>
>For .net, you can also use interop to call win32 api or unmanaged
>functions(from an unmanaged dll).
>
>Sincerely,
>
>Steven Cheng
>
>Microsoft MSDN Online Support Lead
>

Bookmark and Share