C# Problem
  Home FAQ Contact Sign in
microsoft.public.windowsxp.embedded only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... embedded Profile…
 Up
C# Problem         


Author: Reinhard Achleitner
Date: Mar 20, 2008 07:21

Hi!

I'm a beginner in creating embedded images, but after one week work, i'm
getting in :-)

But there is a problem i can't solve yet. I want to get the mac address with
c# on the machine. .net 1.1 is installed, but following code hangs at foreach:

ManagementClass oMClass = new ManagementClass
("Win32_NetworkAdapterConfiguration");

ManagementObjectCollection colMObj = oMClass.GetInstances();
foreach(ManagementObject objMO in colMObj)
{
MessageBox.Show(objMO["MacAddress"].ToString());
}

The same code works well on my developing machine, but not on the XP Embedded.
Have i forgotten a component?

kind regards

Reinhard
4 Comments
RE: C# Problem         


Author: flamey
Date: Mar 20, 2008 11:06

I'm no expert either, but make sure you have WMI components added to your
image.

--
http://www.sochi-travel.info/">My Sochi Blog

"Reinhard Achleitner" wrote:
Show full article (0.89Kb)
no comments
Re: C# Problem         


Author: KM
Date: Mar 21, 2008 00:00

And WMI Network Provider.

--
=========
Regards,
KM
> I'm no expert either, but make sure you have WMI components added to your
> image.
>
> --
> http://www.sochi-travel.info/">My Sochi Blog
>
>
>
> "Reinhard Achleitner" wrote:
>
>> Hi!
>...
Show full article (0.97Kb)
no comments
Re: C# Problem         


Author: Reinhard Achleitner
Date: Mar 22, 2008 04:43

Hi!

Thx for your help, i added the WMI components and it works now..

kind regards
Reinhard

"KM" nospam_yahoo.com> schrieb im Newsbeitrag
news:eLdbBFyiIHA.2084@TK2MSFTNGP02.phx.gbl...
> And WMI Network Provider.
>
> --
> =========
> Regards,
> KM
>
>> I'm no expert either...
Show full article (1.24Kb)
no comments
Re: C# Problem         


Author: Reinhard Achleitner
Date: Mar 22, 2008 04:43

Hi!

Thx for your help, i added the WMI components and it works now..

kind regards
Reinhard

"KM" nospam_yahoo.com> schrieb im Newsbeitrag
news:eLdbBFyiIHA.2084@TK2MSFTNGP02.phx.gbl...
> And WMI Network Provider.
>
> --
> =========
> Regards,
> KM
>
>> I'm no expert either...
Show full article (1.24Kb)
no comments