473,800 Members | 3,056 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

When I do:

using ROOT.CIMV2.Win3 2;

the class there isn't.

This namespace or class I didn't find it.

How i using this classes?

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

using ROOT.CIMV2.Win3 2;

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.co m>
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.NETFramework SDKv1.1/cptools/html/cpgrfmanagement stronglytypedcl
assgeneratormgm tclassgenexe.ht m

using System;

using System.Manageme nt;

using ROOT.CIMV2.Win3 2;

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.GetInst ances())

{

Console.WriteLi ne(ps.Name);

}

// Initialize the instance of LogicalDisk with

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

LogicalDisk dskD = new LogicalDisk(new ManagementPath(

"win32_LogicalD isk.DeviceId=\" d:\""));

Console.WriteLi ne(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******** **********@torn ado.fastwebnet. it...
When I do:

using ROOT.CIMV2.Win3 2;

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.Win3 2 is a WMI namespace, not a .NET namespace.
Reference the managed WMI wrapper by the following statement:

using System.Manageme nt;

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******** **********@torn ado.fastwebnet. it...
When I do:

using ROOT.CIMV2.Win3 2;

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.publi c.dotnet.Framew ork.Wmi
is a specialized NG for System.Manageme nt and WMI related questions?

Willy.

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

using ROOT.CIMV2.Win3 2;

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
5265
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 <xsd:import namespace="MyNameSpace" schemaLocation="a.xsd"/> and run "xsd.exe /c a.xsd b.xsd", xsd.exe errors out with "Error: A schema with the namespace 'MyNameSpace' has already been added."
5
2465
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
188
7260
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 - non-deterministic destructors - Objects can't exist on the stack - Type / Reference Types
1
2296
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
6674
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 section of that Form is 4 or 5 ASP:Panels pretending to be a set of Tabs, each with its own section of the form.
6
1225
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 says it's undefined and then one that says the class has no public members or cannot be found. Thanks, Jim
1
1580
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 http://test.org.Address Here is the schema defining the Employee: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://test.org/emp" xmlns="http://test.org/emp"
5
2533
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 pointer to object of class Form1. I don't known how to use method add(), where can I find it. From Form1 I can add value like this this->listBox1- I cant find it. I have textBox1 on Form1 and I can change text in this control like this ...
7
3167
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 namespace in another namespace that i've written called "MyLamp_NS". I have pasted a code snippet below to show how i import the namespace. MyBulb_NS has been compiled to a dll without errors. When I attempt to compile MyLamp_NS it fails. I have pasted its...
2
7804
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
9689
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10269
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.