作者在 2009-03-21 11:00:47 发布以下内容
using System.Management;
//get the MAC address
ManagementClass mc=new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc=mc.GetInstances();
string[] MacAddress=new string[2];
int ii=0;
foreach(ManagementObject mo in moc)
{
if((bool)mo["IPEnabled"]==true)
{
MacAddress[ii]=mo["MacAddress"].ToString();
ii++;
}
mo.Dispose();
}
正在研究中!!!