473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Another Problem ... but Namespace \root\cimv2.

When I do:

using ROOT.CIMV2.Win32;

the class there isn't.

This namespace or class I didn't find it.

How i using this classes?

Nov 16 '05 #1
4 5242
SnakeS <Sn***********@hotmail.com> wrote:
When I do:

using ROOT.CIMV2.Win32;

the class there isn't.

This namespace or class I didn't find it.

How i using this classes?


Where did you read about this namespace? It looks like it's in someone
else's assembly, in which case you need to get the assembly and add a
reference to it in the project.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
I've take this from:

ms-help://MS.NETFrameworkSDKv1.1/cptools/html/cpgrfmanagementstronglytypedcl
assgeneratormgmtclassgenexe.htm

using System;

using System.Management;

using ROOT.CIMV2.Win32;

public class App

{

public static void Main()

{

// Enumerate instances of the Win32_process.

// Print the Name property of the instance.

foreach(Process ps in Process.GetInstances())

{

Console.WriteLine(ps.Name);

}

// Initialize the instance of LogicalDisk with

// the WMI instance pointing to logical drive d:.

LogicalDisk dskD = new LogicalDisk(new ManagementPath(

"win32_LogicalDisk.DeviceId=\"d:\""));

Console.WriteLine(dskD.Caption);

}

}

Now, for use LogicalDisk or other like classes I must using ROOT.CIMV2 ...
Or no?

Thanks in advance

"SnakeS" <Sn***********@hotmail.com> wrote in message
news:8g******************@tornado.fastwebnet.it...
When I do:

using ROOT.CIMV2.Win32;

the class there isn't.

This namespace or class I didn't find it.

How i using this classes?

Nov 16 '05 #3
Hi,

ROOT.CIMV2.Win32 is a WMI namespace, not a .NET namespace.
Reference the managed WMI wrapper by the following statement:

using System.Management;

And then, for example, use the SelectQuery class to gain access to the WMI
objects.
You can also use the ManagementPath class to work with WMI namespaces.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"SnakeS" <Sn***********@hotmail.com> wrote in message
news:8g******************@tornado.fastwebnet.it...
When I do:

using ROOT.CIMV2.Win32;

the class there isn't.

This namespace or class I didn't find it.

How i using this classes?


Nov 16 '05 #4
Please post such questions to ...
microsoft.public.dotnet.Framework.Wmi
is a specialized NG for System.Management and WMI related questions?

Willy.

"SnakeS" <Sn***********@hotmail.com> wrote in message
news:8g******************@tornado.fastwebnet.it...
When I do:

using ROOT.CIMV2.Win32;

the class there isn't.

This namespace or class I didn't find it.

How i using this classes?

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rehveli | last post by:
Isn't it possible to generate .cs files from schemas, where one schema imports another, and both have the same namespace? If a.xsd and b.xsd have namespace "MyNameSpace", and in b.xsd I do...
5
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
188
by: christopher diggins | last post by:
I have posted a C# critique at http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up the following issues : - unsafe code - attributes - garbage collection -...
1
by: moonriver | last post by:
In a xml file, can we make reference to another xml file so that all contents of the latter xml file will be included into the first xml file? Had better give me an example for details.
6
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a...
6
by: JimO | last post by:
I have a namespace called utility that I compiled using the /t:library switch. It compiles fine. When I try to import it into a database interface namespace, I get an error on compilation that...
1
by: mflll | last post by:
How does one say in one schema that one wants an element defined in another schema. For example, I want to include in the Employee definition, an Address element defined in the schema...
5
by: lukasmazur | last post by:
Hi I have a problem with using listBox1. I have a two forms form1 and form2. In form1 are controls listBox1, textBox1 and button witch creating object of class Form2. In class Form2 I create a...
7
by: c4tech | last post by:
I am using VB.net with ASP.net 2.0 and am not using Visual Studio. I use my text editor. I have written a class and wrapped it in a namespace called "MyBulb_NS". I want to import and use that...
2
by: yllanger | last post by:
Hi guys, I have come yet again to ask another question. :D The scenario is like this. Using Parser; namespace Crawler { public void Main() {
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.