473,503 Members | 939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WMi classes

3 New Member
Hi

please can some1 clear ths for me

i m developing a c++ code to enumerate the SAN elements

so i ws able to extract variables from the MSFC_FCAdapterHBAAttributes class
but whn i used MSFC_FibrePortHBAAttributes class thrs a sub class in it for the Attributes,,,
can anyone explain how do i retrieve
MSFC_HBAPortAttributesResults Attributes;

Thx
Jul 25 '07 #1
5 4651
weaknessforcats
9,208 Recognized Expert Moderator Expert
MSFC_HBAPortAttributesResults is just a struct. The members are publicly available. Read this.
Jul 25 '07 #2
preetsvarma
3 New Member
MSFC_HBAPortAttributesResults is just a struct. The members are publicly available. Read this.

u dint get me... just check ths below

do {
hr_next = pIEnumWbemClassObject->Next(
WBEM_INFINITE, // LONG lTimeOut,
1, // ULONG uCount,
&pIWbemClassObjectInst, // IWbemClassObject** ppObjects,
&ulCount // ULONG* puReturned
);
if (WBEM_S_NO_ERROR == hr_next) {

// Extract the MfgDomain parameter.
hr = pIWbemClassObjectInst->Get(
PROP_NAME_MfgDomain, // LPCWSTR wszName,
0, // LONG lFlags,
&vtMfgDomain, // VARIANT* pVal,
NULL, // CIMTYPE* pvtType,
NULL // LONG* plFlavor
);

whr in


hr_next n hr are of type HRESULT
pIEnumWbemClassObject is of type IEnumWbemClassObject

the above code successfully extracted the MfgDomain parameter from the struct
MSFC_FCAdapterHBAAttributes

but in the same way m unable to get the parameters from MSFC_HBAPortAttributesResults...


so pls tell me hw to do tht

thx
Jul 26 '07 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
The MSFC_FCAdapterHBAAttributes is a class used by the WMI provider.

The MSFC_HBAPortAttributesResults is a class used by the WMI client.

The IWbemClassObject::Get() that you are using is the WMI providers derioved class. It can only return values in a VARIANT.

If you are the client, then you would have created rown MSFC_HBAPortAttributesResults objects. But since these do not derive from IWbemClassObject, you can't use IWbemClassObject::Get() with MSFC_HBAPortAttributesResults objects.
Jul 26 '07 #4
preetsvarma
3 New Member
The MSFC_FCAdapterHBAAttributes is a class used by the WMI provider.

The MSFC_HBAPortAttributesResults is a class used by the WMI client.

The IWbemClassObject::Get() that you are using is the WMI providers derioved class. It can only return values in a VARIANT.

If you are the client, then you would have created rown MSFC_HBAPortAttributesResults objects. But since these do not derive from IWbemClassObject, you can't use IWbemClassObject::Get() with MSFC_HBAPortAttributesResults objects.

hey thanks for clearing tht

Could u please tell how can i make use of tht struct MSFC_HBAPortAttributesResults ... i mean the C++ code for it
Jul 30 '07 #5
weaknessforcats
9,208 Recognized Expert Moderator Expert
Could u please tell how can i make use of tht struct MSFC_HBAPortAttributesResults ... i mean the C++ code for it
I am not a WMI expert. So I would do what I am telling you to do. Namely, research MSDN. Use Google. There's a lot of material on WMI out there.
Jul 30 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
741
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
9
1628
by: Jack | last post by:
Hello I have a library of calculationally intensive classes that is used both by a GUI based authoring application and by a simpler non-interactive rendering application. Both of these...
9
6623
by: Aguilar, James | last post by:
I know that one can define an essentially unlimited number of classes in a file. And one can declare just as many in a header file. However, the question I have is, should I? Suppose that, to...
12
21200
by: Langy | last post by:
Hello I'm fairly new to C++ but have programmed several other languages and found most of c++ fairly easy (so far!). I've come to a tutorial on classes, could someone please tell me why you...
4
1798
by: john townsley | last post by:
do people prefer to design classes for the particular job or for a rangle of tasks they might encounter now and in the future. i am doing some simple win32 apps and picking classes is simple, but...
2
9478
by: joye | last post by:
Hello, My question is how to use C# to call the existing libraries containing unmanaged C++ classes directly, but not use C# or managed C++ wrappers unmanaged C++ classes? Does anyone know how...
18
2018
by: Edward Diener | last post by:
Is the packing alignment of __nogc classes stored as part of the assembly ? I think it must as the compiler, when referencing the assembly, could not know how the original data is packed otherwise....
6
2919
by: ivan.leben | last post by:
I want to write a Mesh class using half-edges. This class uses three other classes: Vertex, HalfEdge and Face. These classes should be linked properly in the process of building up the mesh by...
0
2016
by: ivan.leben | last post by:
I am writing this in a new thread to alert that I found a solution to the problem mentioned here: http://groups.google.com/group/comp.lang.c++/browse_thread/thread/7970afaa089fd5b8 and to avoid...
2
1899
by: Amu | last post by:
i have a dll ( template class) ready which is written in VC++6. But presently i need to inherit its classes into my new C#.net project.so if there is some better solution with u then please give me...
0
7203
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
7282
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
7339
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...
0
5581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
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...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
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...

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.