Hello moondaddy,
I'm just working on WMI too.
To use MgmtClassGen.exe, you must type something like that MgmtClassGen.exe
win32_NetworkAdapterConfuguration /l cs (for c#) /p c:\MyBeautifulClass.cs
After you have to import the class in your project and using this statement :
using ROOT.CIMV2.Win32;
After that wmi is more easy ^^
Never the less, I work with VS 2005 on windows xp pro sp2, and i use wmi
method like enableStatic who permit me to change my IP address but it don't
work.
Do you know what is the problem and how i can resolve it ?
Thanks for all
Romain
> Thanks for the reply! I'm looking at some sample code I want to use
> that will automatically generate strongly typed names. At the top of
[quoted text clipped - 6 lines]
> wasn't clear on how to use that generate class in my project. I'm
> just not clear on the whole thing.
moondaddy - 30 Mar 2006 07:23 GMT
Thanks Romain,
I understand how to create the class, but don't understand what you mean by
'import the class'. its not a dll, its just a cs file. therefore I assume
I just include it in the project. I have done this, but the using
statement:
using ROOT.CIMV2.Win32;
still doesn't compile as it has no idea what 'using ROOT.CIMV2.Win32' is.
can you advise me on this? do I need to reference a dll in my project
references? Or do I need to import a namespace into my project (which begs
another question: I'm moving from VS 2003 and VB to VS2005 and CS. I don't
see any where you can import name spaces. or is that a vb thing and not a
cs thing?).
Since I haven't worked with wmi yet, I cant advise on your IP issue, but
when I cross that bridge, I'll let you know.

Signature
moondaddy@nospam.nospam
> Hello moondaddy,
>
[quoted text clipped - 31 lines]
>> wasn't clear on how to use that generate class in my project. I'm
>> just not clear on the whole thing.