<p>How can I get the MAC Address using only the compact framework?</p>

[{'answer_id': 42824, 'author': 'Greg Roberts', 'author_id': 4269, 'author_profile': 'https://Stackoverflow.com/users/4269', 'pm_score': -1, 'selected': False, 'text': '<p>Add a reference to System.Management.dll and use something like:</p>\n\n<pre><code>Dim mc As System.Management.ManagementClass\nDim mo As ManagementObject\nmc = New ManagementClass("Win32_NetworkAdapterConfiguration")\nDim moc As ManagementObjectCollection = mc.GetInstances()\nFor Each mo In moc\n    If mo.Item("IPEnabled") = True Then\n        ListBox1.Items.Add("MAC address " &amp; mo.Item("MacAddress").ToString())\n    End If\nNext\n</code></pre>\n'}, {'answer_id': 42827, 'author': 'Matt Hamilton', 'author_id': 615, 'author_profile': 'https://Stackoverflow.com/users/615', 'pm_score': 2, 'selected': False, 'text': '<p>Here are the <strong>first three hits</strong> from a Google search for "MAC address in Compact Framework:</p>\n\n<ol>\n<li><a href="http://arjunachith.blogspot.com/2007/08/retrieving-mac-address-in-compact.html" rel="nofollow noreferrer">http://arjunachith.blogspot.com/2007/08/retrieving-mac-address-in-compact.html</a></li>\n<li><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=920417&amp;SiteID=1" rel="nofollow noreferrer">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=920417&amp;SiteID=1</a></li>\n<li><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=188787&amp;SiteID=1" rel="nofollow noreferrer">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=188787&amp;SiteID=1</a></li>\n</ol>\n\n<p>Did none of those help?</p>\n\n<p>Two out of three point to <a href="http://www.opennetcf.com/" rel="nofollow noreferrer">OpenNETCF</a> as a way to do it.</p>\n'}, {'answer_id': 47574, 'author': 'Quibblesome', 'author_id': 1143, 'author_profile': 'https://Stackoverflow.com/users/1143', 'pm_score': 3, 'selected': False, 'text': '<p>1.4 of the OpenNETCF code gets the information from the following P/Invoke call:</p>\n\n<pre><code>    [DllImport ("iphlpapi.dll", SetLastError=true)]\n    public static extern int GetAdaptersInfo( byte[] ip, ref int size );\n</code></pre>\n\n<p>The physical address (returned as MAC address) I think is around about index 400 - 408 of the byte array after the call. So you can just use that directly if you don\'t want to use OpenNETCF (why though? OpenNETCF rocks more than stone henge!)</p>\n\n<p>Wonderful P/Invoke.net gives a full example <a href="http://www.pinvoke.net/default.aspx/iphlpapi/GetAdaptersInfo.html" rel="nofollow noreferrer">here</a>.</p>\n\n<p>Oh and to properly answer your question:</p>\n\n<blockquote>\n  <p>only using the Compact Framework</p>\n</blockquote>\n\n<p>You cant. That\'s life with CF, if you want some fun try sending data with a socket synchronously with a timeout. :D</p>\n'}, {'answer_id': 424238, 'author': 'castle1971', 'author_id': 36728, 'author_profile': 'https://Stackoverflow.com/users/36728', 'pm_score': 0, 'selected': False, 'text': "<p>If you can access the registry, try to find your adapter MAC Address under the <code>LOCAL_MACHINE\\Comm\\PCI\\***\\Parms\\MacAddress</code>. </p>\n\n<p>It may be a quick and dirty solution that doesn't involve the use of WMI or OpenNETCF ...</p>\n"}]
['https://Stackoverflow.com/questions/42814', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4463/']