R
Rene
Please help!
The following C# code retrieves the MAC address. The code works great in a
regular windows XP system but it does not work on an XP Embedded OS image
running the embedded version of .Net. I am probably missing one or two files
but I am not sure which ones, Could someone help me???
---------------------------------------------------------------
string mdac = "";
System.Management.ManagementClass mc = new
System.Management.ManagementClass("Win32_NetworkAdapterConfiguration");
System.Management.ManagementObjectCollection moc = mc.GetInstances();
foreach(System.Management.ManagementObject mo in moc)
{
if((bool)mo["IPEnabled"] == true)
mdac = mo["MacAddress"].ToString();
mo.Dispose();
}
return mdac;
---------------------------------------------------------------
The following C# code retrieves the MAC address. The code works great in a
regular windows XP system but it does not work on an XP Embedded OS image
running the embedded version of .Net. I am probably missing one or two files
but I am not sure which ones, Could someone help me???
---------------------------------------------------------------
string mdac = "";
System.Management.ManagementClass mc = new
System.Management.ManagementClass("Win32_NetworkAdapterConfiguration");
System.Management.ManagementObjectCollection moc = mc.GetInstances();
foreach(System.Management.ManagementObject mo in moc)
{
if((bool)mo["IPEnabled"] == true)
mdac = mo["MacAddress"].ToString();
mo.Dispose();
}
return mdac;
---------------------------------------------------------------