Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

How to import Imports ROOT.CIMV2.Win32

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
moondaddy - 28 Mar 2006 21:25 GMT
I have a c# 2.0 class and am supposed to use:

using ROOT.CIMV2.Win32;

However, I can't figure out what I need to reference so I can use
ROOT.CIMV2.Win32.  Can someoen please advise?

Signature

moondaddy@nospam.nospam

Romain Laffitte - 28 Mar 2006 23:05 GMT
Hello moondaddy,

I don't understant what are your problem can you explain ?

Sorry for my english I'm French

You can download this software to help you to explore class of root.comv2

http://www.csharpfr.com/codes/EXPLORATEUR-CLASSES-WMI_11600.aspx

After you can use MgmtClassGen.exe utilities, it's a software given whith
visual studio who permit to create a visual studio class from a class of
wmi, it's more easy whith that, i hope it can help you.

Romain

> I have a c# 2.0 class and am supposed to use:
>
> using ROOT.CIMV2.Win32;
>
> However, I can't figure out what I need to reference so I can use
> ROOT.CIMV2.Win32.  Can someoen please advise?
moondaddy - 29 Mar 2006 08:17 GMT
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 the code
file it has this using statement:

using ROOT.CIMV2.Win32;

and ROOT gets a compile error.  I followed the instructions to create a
class using the MgmtClassGen.exe from the command prompt, but it wasn't
clear on how to use that generate class in my project.  I'm just not clear
on the whole thing.

Signature

moondaddy@nospam.nospam

> Hello moondaddy,
>
[quoted text clipped - 18 lines]
>> However, I can't figure out what I need to reference so I can use
>> ROOT.CIMV2.Win32.  Can someoen please advise?
Romain Laffitte - 29 Mar 2006 11:44 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.