The IWbemClassObject interface contains and manipulates both class definitions and class object instances.
From the WBEM client perspective, this interface is always in-process. Put (write) operations will only affect the local copy of the object, and Get (read) operations always retrieve values from the local copy.
You can perform updates to CIMOM only when entire objects are read or written using methods on the IWbemServices interface. Examples of such updates are IWbemServices::PutInstance or IWbemServices::PutClass.
This interface is not implemented by the user or by a provider under any circumstances. The implementation provided by CIMOM is the only one that is supported.
IWbemClassObject Methods | Description | |
GetQualifierSet | Allows access to the qualifier set of the entire object. | |
Get | Gets a particular property value. | |
Put | Updates or creates a particular property value. | |
Delete | Removes the specified property from the object. | |
GetNames | Obtains a list of the names of the properties in the object. | |
BeginEnumeration | Begins an enumeration of the properties. | |
Next | Obtains the next property in an enumeration after an initial call to BeginEnumeration. | |
EndEnumeration | Ends an enumeration begun with BeginEnumeration. | |
GetPropertyQualifierSet | Allows access to the qualifiers of a particular property. | |
Clone | Makes a copy of the current object. | |
GetObjectText | Obtains the textual rendition of the object in Managed Object Format (MOF) syntax. | |
SpawnDerivedClass | Creates a new derived class from the current class. | |
SpawnInstance | Creates a new instance from the current class. | |
CompareTo | Tests two objects for equality. | |
GetPropertyOrigin | Reports the class in which a particular property was introduced. | |
InheritsFrom | Reports whether the current object inherits from a particular class. | |
GetMethod | Gets the in- and out-parameter definitions for a specific CIM method. | |
PutMethod | Creates a CIM method. | |
DeleteMethod | Removes a CIM method. | |
BeginMethodEnumeration | Begins an enumeration of CIM methods for the object. | |
NextMethod | Retrieves the next CIM method definition in an enumeration of methods. | |
EndMethodEnumeration | Ends the enumeration of CIM methods for an object. | |
GetMethodQualifierSet | Returns the qualifier set object for a specific CIM method. | |
GetMethodOrigin | Reports the class in which a CIM method is defined. |
^# $ K + IWbemClassObject::QueryInterface¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::QueryInterface method determines if the object supports a particular COM interface. If it does, the system increases the object's reference count, and the application can use that interface immediately.
HRESULT IWbemClassObject::QueryInterface(
[in] REFIID riid,
[out] LPVOID *ppv
);
Parameters
riid
The COM interface identifier of the requested interface.
obp
Address of a pointer that is filled with the interface pointer if the query succeeds.
Return Values
Returns standard COM error codes for QueryInterface. It returns WBEM_S_NO_ERROR if the call succeeds. If the requested interface is not supported this call will fail and return E_NOINTERFACE.
Remarks
When the application no longer needs the interface retrieved by a call to this method, it must call the Release_hmm_IWbemClassObject_Release method for that interface to free it. The QueryInterface method allows the extension of objects without interfering with existing or future functionality of the objects.
The QueryInterface method is part of the IUnknown interface inherited by the object. For more information about this method, see the COM documentation in the Microsoft Platform SDK.
See Also
IUnknown Interface Basics_hmm_iunknown_interface_basics
^# $ K + IWbemClassObject::AddRef¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::AddRef method increases the object's reference count by 1.
ULONG AddRef( );
Parameters
None.
Return Values
Returns the new reference count.
Remarks
When you create the object, its reference count is set to 1. Every time an application obtains an interface to the object or calls the AddRef method, the object's reference count increases by 1. Use the Release_hmm_IWbemClassObject_Release method to decrease the object's reference count by 1.
This method is part of the IUnknown interface inherited by the object. For a complete discussion of IUnknown methods, see IUnknown Programming Basics.
For more information about this method, see the COM documentation in the Microsoft Platform SDK.
See Also
IUnknown Interface Basics_hmm_iunknown_Interface_basics
^# $ K + IWbemClassObject::Release¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::Release method decreases the object's reference count by 1.
ULONG IWbemClassObject::Release( );
Parameters
None.
Return Values
Returns the new reference count.
Remarks
The object deallocates itself when its reference count reaches zero. Use the AddRef_hmm_IWbemClassObject_AddRef method to increase the object's reference count by 1.
This method is part of the IUnknown interface inherited by the object. For more information about this method, see the COM documentation in the Microsoft Platform SDK.
See Also
IUnknown Interface Basics_hmm_iunknown_interface_basics
^# $ K + IWbemClassObject::GetQualifierSet¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::GetQualifierSet method returns an interface pointer that allows read and write operations on the set of qualifiers for the entire class object, whether the object is an instance or a class definition. Any qualifiers added, deleted, or edited using the returned pointer apply to the entire instance or class definition.
HRESULT IWbemClassObject::GetQualifierSet(
[out] IWbemQualifierSet **ppQualSet
);
Parameters
ppQualSet
Receives the interface pointer that allows access to the qualifiers for the class object. The returned object has a positive reference count upon return from the call. The caller must call IWbemQualifierSet::Release_hmm_IWbemQualifierSet_Release when the object is no longer needed. This parameter cannot be NULL. On error, a new object is not returned and the pointer is left unmodified.
Return Values
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the call. |
WBEM_S_NO_ERROR | The call succeeded. |
WBEM_E_INVALID_PARAMETER | A null pointer was used in the parameter list. |
WBEM_E_FAILED | There has been a general failure. |
See Also
IWbemQualifierSet_hmm_IWbemQualifierSet, IWbemClassObject::GetPropertyQualifierSet_hmm_IWbemClassObject_GetPropertyQualifierSet
^# $ K + IWbemClassObject::Get¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::Get method retrieves the specified property value, if it exists. This method also can return system properties_hmm_System_Properties.
HRESULT IWbemClassObject::Get(
[in] BSTR strName,
[in] LONG lFlags,
[out, OPTIONAL] VARIANT *pVal,
[out, OPTIONAL] CIMTYPE *pvtType,
[out, OPTIONAL] LONG *plFlavor
);
Parameters
strName
The desired property name. This must point to a valid BSTR. It is treated as read-only.
lFlags
Reserved. It must be zero.
pVal
Points to an existing uninitialized VARIANT structure that receives the property value, if found. Since this is an out-only parameter, this method calls VariantInit on this VARIANT, so the caller should take care that this is not pointing to an active VARIANT. The pVal parameter can be NULL if a property value is not required. If an error code is returned from this method, the pointer is left unmodified.
Note
It is required that the caller call VariantClear on the returned VARIANT when its value is no longer required. This will prevent memory leaks in the client process. The type of the VARIANT returned does not always indicate the real CIM type of the property, which is indicated by the pType out-parameter. If the property currently has no value (the null value), the VARIANT is of type VT_NULL. Client applications must use the plType parameter to learn the real CIM type of the property.
If the type is VT_UNKNOWN, the returned property in the VARIANT is an embedded IWbemClassObject. After extracting the IUnknown pointer, the user must call IUnknown::QueryInterface for IID_IWbemClassObject and use the returned pointer to access the embedded IWbemClassObject. Note that VariantClear invokes Release on the object. However, since the user causes an implicit AddRef to occur by calling QueryInterface, the user must explicitly Release the IWbemClassObject pointer retrieved from IUnknown::QueryInterface, as well as call VariantClear on the returned VARIANT.
pvtType
Can be NULL. If it is not NULL, it receives the CIM type of the property, that is, one of the CIM type constants, such as CIM_SINT32, CIM_STRING, etc. This indicates the CIM semantics of the property value packed into the VARIANT.
plFlavor
Can be NULL. If not NULL, the LONG value pointed to receives information on the origin of the property:
WBEM_FLAVOR_ORIGIN_LOCAL
The property belongs to the derived-most class.
WBEM_FLAVOR_ORIGIN_PROPAGATED
The property was inherited from a parent class.
WBEM_FLAVOR_ORIGIN_SYSTEM
The property is a standard system property.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_NOT_FOUND | The specified property was not found. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_INVALID_PARAMETER | One or more parameters was not valid. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
If the underlying type of the property is an object path, a date/time string, or another special type, the returned values in the VARIANT will not contain enough information to identify the true type. The pvtType out-parameter will indicate this.
To obtain the string form of the CIM type for the property, the IWbemQualifierSet pointer for the property must be obtained and the CIMTYPE qualifier retrieved. That qualifier is the string form of the CIM type, such as "sint32" vs. CIM_SINT32 (a numeric constant).
Note
When you create a new object using IWbemClassObject::SpawnInstance
_hmm_IWbemClassObject_SpawnInstance, it is important to note that some system properties are not set until the object has been written to CIMOM. In all cases, IWbemClassObject::Get will succeed in accessing the requested system property, but the returned VARIANT may contain VT_NULL.
See Also
IWbemClassObject::GetPropertyQualifierSet_hmm_IWbemClassObject_GetPropertyQualifierSet, System Classes, Properties, and Qualifiers
The following sample code retrieves the CIM class name from an object using the system property __CLASS_hmm_System_Class_Reference:
IWbemClassObject *pObj = NULL;
VARIANT v;
BSTR strClassProp = SysAllocString(L"__CLASS");
pObj->Get(strClassProp, 0, &v, 0, 0);
SysFreeString(strClassProp);
wprintf(L"The class name is %S\n", V_BSTR(&v));
VariantClear( &v );
^# $ K + IWbemClassObject::Put¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::Put method sets a named property to a new value. This method always overwrites the current value with the new one. When the IWbemClassObject points to a CIM class definition, Put will either create or update the property value. When the IWbemClassObject points to a CIM instance, Put will update a property value only; it cannot create one.
The user may not create properties with names that begin or end with an underscore. This is reserved for system classes and properties.
HRESULT IWbemClassObject::Put(
[in] BSTR strName,
[in] LONG lFlags,
[in] VARIANT *pVal,
[in] CIMTYPE vtType
);
Parameters
strName
Must point to a valid BSTR containing the property name. The pointer is treated as read-only. This cannot be NULL.
lFlags
Reserved. It must be zero.
pVal
Must point to a valid VARIANT, which becomes the new property value. If pVal is NULL or points to a VARIANT of type VT_NULL, the property is set to NULL, that is, no value.
Note
The NULL value for a property designated by a VARIANT of type VT_NULL is distinguished from a property of type VT_I4 with a zero value.
When creating new properties, if pVal is NULL or points to a VT_NULL, the type of the property is determined from the vtType parameter.
If pVal is to contain an embedded IWbemClassObject, the caller must call IWbemClassObject::QueryInterface
_hmm_IWbemClassObject_QueryInterface for IID_IUNKNOWN and place the resulting pointer in the VARIANT using a type of VT_UNKNOWN.The pointer is treated as read-only. The caller is responsible for invoking VariantClear after this call is complete.
vtType
Use this parameter only when creating new properties in a CIM class definition and pVal is NULL or points to a VARIANT of type VT_NULL. In such a case, the vtType parameter specifies the CIM type of the property. In every other case, vtType must be zero. Also, vtType must be zero whenever the underlying object is an instance (even if pVal is NULL), since the type of the property is fixed and cannot be changed. In other words, use vtType if, and only if, pVal is NULL or points to a VT_NULL VARIANT, and the underlying object is a CIM class.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
WBEM_E_INVALID_PROPERTY_TYPE | Property type is not recognized. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_TYPE_MISMATCH | For instances, this error code indicates that the pVal parameter points to a VARIANT of an incorrect type for the property. For class definitions, this is returned if the property already exists in the parent class, and the new COM type is different from the old COM type. Such properties are read-only for the derived class. |
WBEM_E_TOO_MANY_PROPERTIES | Exceeded limit of 1024 properties in a class hierarchy. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
If the property exists in the superclass, its default value is changed unless it is a type mismatch. If the property does not exist and it is not a type mismatch, the property is created. There is a limit of 1024 properties in a class hierarchy.
When executing this method on an instance, an overwrite always occurs. It occurs because the property always exists.
When you are creating a new class, and the underlying type of the property is an object reference, a date/time string, or other special type, it might be necessary to modify the CIMTYPE qualifier for the property to indicate the special new class. When modifying properties of an instance, the qualifiers are set to the correct values ahead of time.
You can only write system properties when you create a new class. In that case, the name of the class you create is designated by writing it to the system property __CLASS_hmm_System_Properties.
To set an exising class property to NULL, specify CIM_EMPTY as the type and pass in a NULL for the pVal.
See Also
System Classes, Properties, and Qualifiers_
The following code sample sets the class name for a new CIM class:
// Empty object from IWbemServices::GetObject
IWbemClassObject *pObj =
// Set up the property value
VARIANT v;
VariantInit(&v);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = SysAllocString(L"MyClass");
// Write it
BSTR strClassProp = SysAllocString(L"__CLASS");
pObj->Put(strClassProp, 0, &v, 0);
// Cleanup
SysFreeString(strClassProp);
VariantClear(&v);
^# $ K + IWbemClassObject::Delete¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::Delete method deletes the specified property from a CIM class definition and all of its qualifiers. Since instances cannot have contents that are different from the owning class, delete operations for properties are only possible on class definitions. If you invoke Delete on a property in an instance, the operation succeeds, but rather than removing the value it is simply reset to the default value for the class.
It is not possible to delete a property that was inherited from a parent class. However, if an override default value for a property inherited from a parent class was specified, it is possible to revert to the parents default value by invoking this method. In this case, WBEM_S_RESET_TO_DEFAULT returns.
System properties_hmm_System_Properties cannot be deleted.
HRESULT IWbemClassObject::Delete(
[in] BSTR strName
);
Parameters
strName
The property name to delete. This must point to a valid BSTR. It is treated as read-only.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_INVALID_OPERATION | The user attempted to delete a property which cannot be deleted. |
WBEM_E_INVALID_PARAMETER | An invalid Name was specified. |
WBEM_E_NOT_FOUND | The specified property does not exist. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_PROPAGATED_PROPERTY | The user attempted to delete a property that was not owned. The property was inherited from a parent class. |
WBEM_S_NO_ERROR | The call succeeded. |
WBEM_S_RESET_TO_DEFAULT | The caller deleted an override default value for the current class. The default value for this property in the parent class has been reactivated. |
See Also
System Properties_hmm_System_Properties
^# $ K + IWbemClassObject::GetNames¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::GetNames method retrieves the names of the properties in the object. Furthermore, depending on user-supplied selection criteria, it can retrieve all or a subset of the properties. These properties can then be accessed by using IWbemClassObject::Get_hmm_IWbemClassObject_Get for each name. This method can also return system properties_hmm_System_Properties.
HRESULT IWbemClassObject::GetNames(
[in] BSTR strQualifierName,
[in] LONG lFlags,
[in] VARIANT *pQualifierVal,
[out] SAFEARRAY (BSTR) *pstrNames
);
Parameters
strQualifierName
Can be NULL. If not NULL, it must point to a valid BSTR specifying a qualifier name which acts as part of a filter. This is treated as read-only. See Remarks.
lFlags
See Remarks.
pQualifierValue
Can be NULL. If not NULL, it must point to a valid VARIANT structure initialized to a filter value. See Remarks. This VARIANT is treated as read-only by the method. Thus, the caller is responsible for calling VariantClear on it, if required.
pstrNames
Cannot be NULL, but on entry this parameter must point to NULL. A new SAFEARRAY is always allocated, and the pointer is set to point to it. The returned array can have zero elements, but is always allocated when WBEM_S_NO_ERROR returns. On error, a new SAFEARRAY is not returned.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_INVALID_PARAMETER | One or more parameters were invalid, or an incorrect combination of flags and parameters was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the task. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
The names returned are controlled by a combination of flags and parameters. For example, all names of all properties can be specified, or only the key properties can be specified, and so on. The primary filter is specified in the lFlags parameter; the other parameters vary depending upon it.
The flag values are bit fields, and can be combined. One flag from each of the following groups can be combined with a flag from each of the other groups. Flag values within a group are mutually exclusive.
GROUP 1
WBEM_FLAG_ALWAYS
Return all property names. strQualifierName and pQualifierVal are not used.
WBEM_FLAG_ONLY_IF_TRUE
Return only properties that have a qualifier of the name specified by the parameter strQualifierName. If this flag is used, you must specify strQualifierName.
WBEM_FLAG_ONLY_IF_FALSE
Return only properties that do not have a qualifier of the name specified by the parameter strQualifierName. If this flag is used, you must specify strQualifierName.
WBEM_FLAG_ONLY_IF_IDENTICAL
Return only properties that have a qualifier of the name specified by the parameter QualifierName, and also have a value identical to the value specified by the VARIANT pointed to by pQualifierVal. If this flag is used, you must specify both QualifierName and pQualifierVal.
GROUP 2
WBEM_FLAG_KEYS_ONLY
Return only the names of the property or properties that define the keys.
WBEM_FLAG_REFS_ONLY
Return only property names that are object references.
GROUP 3
WBEM_FLAG_LOCAL_ONLY
Return only property names that belong to the derived-most class. Exclude properties from the superclass or superclasses.
WBEM_FLAG_PROPAGATED_ONLY
Return only property names that belong to the superclass or superclasses.
WBEM_FLAG_SYSTEM_ONLY
Return only system properties_hmm_System_Properties.
WBEM_FLAG_NONSYSTEM_ONLY
Return only property names that are not system properties.
It is not an error for an empty list, which is an array of zero elements, to be returned in cases where no properties match the specified filters.
See Also
IWbemClassObject::Get_hmm_IWbemClassObject_Get, System Properties_hmm_System_Properties, IWbemClassObject::BeginEnumeration_hmm_IWbemClassObject_BeginEnumeration
^# $ K + IWbemClassObject::BeginEnumeration¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::BeginEnumeration method resets the enumeration cursor to the beginning of the enumeration. The caller must call this method prior to the first call to IWbemClassObject::Next_hmm_IWbemClassObject_Next to enumerate all of the properties on an object.
HRESULT IWbemClassObject::BeginEnumeration(
[in] LONG lEnumFlags
);
Parameters
lEnumFlags
A combination of flags described in Remarks.
Return Values
WBEM_E_INVALID_PARAMETER | The specified combination of flags was invalid or an invalid parameter was specified. |
WBEM_E_OUT_OF_MEMORY | There is not enough memory to begin a new enumeration. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
You can control the properties included in the enumeration by specifying a combination of the following flags. You can combine one flag from each group with any flag from any other group. However, flags from the same group are mutually exclusive.
GROUP 1
WBEM_FLAG_KEYS_ONLY
Only include properties that constitute the key.
WBEM_FLAG_REFS_ONLY
Only include properties that are object references.
GROUP 2
WBEM_FLAG_LOCAL_ONLY
Only include properties that are defined or modified in the class itself. Exclude all properties that are inherited from superclasses. Exclude system properties from the enumeration.
WBEM_FLAG_PROPAGATED_ONLY
Only include properties that are inherited from superclasses. Exclude properties that are defined or modified in the class itself. Exclude system properties from the enumeration.
WBEM_FLAG_SYSTEM_ONLY
Limit the enumeration to system properties_hmm_System_Properties only.
WBEM_FLAG_NONSYSTEM_ONLY
Exclude system properties from the enumeration. Includes local and propagated properties.
See Also
IWbemClassObject::Next_hmm_IWbemClassObject_Next, System Properties_hmm_System_Properties, IWbemClassObject::EndEnumeration_hmm_IWbemClassObject_EndEnumeration
^# $ K + IWbemClassObject::Next¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::Next method retrieves the next property in an enumeration that started with IWbemClassObject::BeginEnumeration_hmm_IWbemClassObject_BeginEnumeration. This should be called repeatedly to enumerate all the properties until WBEM_S_NO_MORE_DATA returns. If the enumeration is to be terminated early, then IWbemClassObject::EndEnumeration_hmm_IWbemClassObject_EndEnumeration should be called.
The order of the properties returned during the enumeration is not defined.
HRESULT IWbemClassObject::Next(
[in] LONG lFlags,
[out, OPTIONAL] BSTR *pstrName,
[out, OPTIONAL] VARIANT *pVal,
[out, OPTIONAL] CIMTYPE *pType,
[out, OPTIONAL] LONG *plFlavor
);
Parameters
lFlags
Reserved. It must be zero.
pstrName
Receives a new BSTR which contains the property name. To prevent memory leaks in the client process, the caller must call SysFreeString when the name is no longer needed. You can set this parameter to NULL if the name is not required.
pVal
This VARIANT is filled with the value of the property. The method calls VariantInit on this VARIANT, so the caller should ensure that the VARIANT is not active prior to the call . The caller must use VariantClear when the value is no longer needed.
You can set this parameter to NULL if the value is not required. If an error code is returned, the VARIANT pointed to by pVal is left unmodified.
pvtType
This parameter can be NULL. If it is not NULL, it must point to a CIMTYPE variable (a LONG) into which the type of the property is placed. It is possible that the value of this property can be a VT_NULL VARIANT, in which case it is necessary to determine the actual type of the property.
plFlavor
Can be NULL. If not NULL, the LONG value pointed to receives information on the origin of the property as follows:
WBEM_FLAVOR_ORIGIN_LOCAL
The property belongs to the derived-most class.
WBEM_FLAVOR_ORIGIN_PROPAGATED
The property was inherited from a parent class.
WBEM_FLAVOR_ORIGIN_SYSTEM
The property is a standard system property.
Return Values
WBEM_E_FAILED | An unspecified error has occurred. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_UNEXPECTED | Did not call IWbemClassObject::BeginEnumeration_hmm_IWbemClassObject_BeginEnumeration. |
WBEM_S_NO_ERROR | The call succeeded. |
WBEM_S_NO_MORE_DATA | No more properties are left in the enumeration. |
WBEM_E_TRANSPORT_FAILURE | This indicates the failure of the remote procedure call (RPC) link between the current process and CIMOM. |
Remarks
If the underlying type of the property is an object path, a date/time, or another special type, then the returned type does not contain enough information. The caller must examine the CIMTYPE for the specified property, and determine if the property is an object reference, date/time, or another special type.
This method also returns system properties_hmm_System_Properties.
See Also
IWbemClassObject::BeginEnumeration_hmm_IWbemClassObject_BeginEnumeration, IWbemClassObject::EndEnumeration_hmm_IWbemClassObject_EndEnumeration, IWbemClassObject::Get_hmm_IWbemClassObject_Get, System Properties_hmm_System_Properties
^# $ K + IWbemClassObject::EndEnumeration¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::EndEnumeration method terminates an enumeration sequence started with IWbemClassObject::BeginEnumeration_hmm_IWbemClassObject_BeginEnumeration. This call is not required, but it is recommended to developers because it releases resources associated with the enumeration. However, the resources are deallocated automatically when the next enumeration is started or the object is released.
HRESULT IWbemClassObject::EndEnumeration( );
Parameters
None.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_S_NO_ERROR | The call succeeded. |
See Also
IWbemClassObject::BeginEnumeration_hmm_IWbemClassObject_BeginEnumeration, IWbemClassObject::Next_hmm_IWbemClassObject_Next
^# $ K + IWbemClassObject::GetPropertyQualifierSet¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::GetPropertyQualifierSet method gets the qualifier set for a particular property in the class object. This succeeds whether the property is a member of an instance or a class definition.
HRESULT IWbemClassObject::GetPropertyQualifierSet(
[in] BSTR strProperty,
[out] IWbemQualifierSet **ppQualSet
);
Parameters
strProperty
The property for which the qualifier set is requested. This must point to a valid BSTR, which is treated as read-only. The property can be local or propagated from the superclass. Note that system properties have no qualifiers so this method returns the error code WBEM_E_SYSTEM_PROPERTY.if you attempt to obtain the IWbemQualifierSet Brett, Dave, format ?pointer for a system property.
ppQualSet
Receives an interface pointer that allows access to the qualifiers for the named property. The caller must call IWbemQualifierSet::Release_hmm_IWbemQualifierSet_Release on the pointer when access to the object is no longer required. The property is set to point to NULL when there are error conditions. A new object is not returned.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_NOT_FOUND | The specified property does not exist. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_SYSTEM_PROPERTY | There was an attempt to get qualifiers on a system property. |
WBEM_S_NO_ERROR | The call succeeded. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
See Also
IWbemQualifierSet_hmm_IWbemQualifierSet
^# $ K + IWbemClassObject::Clone¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::Clone method returns a new object that is a complete clone of the current object. The new object has a COM reference count of 1.
HRESULT IWbemClassObject::Clone(
[out] IWbemClassObject **ppCopy
);
Parameters
ppCopy
This parameter cannot be NULL. It receives the copy of the current object. The caller must call IWbemClassObject::Release_hmm_IWbemClassObject_Release on the returned object when it is no longer required.
A new object is not returned on error.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_INVALID_PARAMETER | NULL was specified as a parameter, and it is not legal in this usage. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to clone the object. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
Use this method to duplicate a class definition, or to duplicate an instance. This can be useful when the original copy of the object is required for backup purposes while a new copy is modified. Likewise, you can use this method to create many new instances from a single source instance. For example, you can use IWbemClassObject::SpawnInstance_hmm_IWbemClassObject_SpawnInstance to create a single starting instance, and you can use IWbemClassObject::Clone to produce 100 copies of the instance quickly. Each object can be modified subsequently to take on its particular values.
It is not possible to use this method to convert a class definition into an instance, or convert an instance into a class definition.
^# $ K + IWbemClassObject::GetObjectText¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::GetObjectText method returns a textual rendering of the object in the MOF Syntax. Notice that the MOF text returned does not contain all the information about the object, but only enough information for the MOF compiler to be able to re-create the original object. For instance, no propagated qualifiers or parent class properties are displayed.
HRESULT IWbemClassObject::GetObjectText(
[in] LONG lFlags,
[out] BSTR *pstrObjectText
);
Parameters
lFlags
Normally zero. If WBEM_FLAG_NO_FLAVORS is specified, qualifiers will be presented without propagation or flavor information. If WBEM_FLAG_NO_SEPARATOR is specified, the trailing semicolon after an class or instance declaration will be omitted from the MOF text. These flags may be combined.
pstrObjectText
This must point to NULL on entry. This parameter receives from CIMOM a newly allocated BSTR that was initialized with SysAllocString. The caller must call SysFreeString on the pointer when the string is no longer required. This pointer points to a MOF syntax rendering of the object upon return from the call. Since this is an OUT parameter, the pointer must not point to a string that is valid before this method is called, because the pointer will not be deallocated.
Return Values
WBEM_E_FAILED | An unspecified error has occurred. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_S_NO_ERROR | The call succeeded. |
See Also
IWbemQualifierSet_hmm_IWbemQualifierSet
^# $ K + IWbemClassObject::SpawnDerivedClass¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
Use the IWbemClassObject::SpawnDerivedClass method to create a new derived class object from the current object. The current object must be a class definition that becomes the superclass of the spawned object. The returned object becomes a subclass of the current object.
HRESULT IWbemClassObject::SpawnDerivedClass(
[in] LONG lFlags,
[out] IWbemClassObject **ppNewClass
);
Parameters
lFlags
Reserved. It must be zero.
ppNewClass
Must not be NULL. This receives the pointer to the new class definition object. The caller must invoke IWbemClassObject::Release_hmm_IWbemClassObject_Release when the object is no longer required, typically after you have invoked IWbemServices::PutClass_hmm_IWbemServices_PutClass to write the class definition. On error, a new object is not returned, and ppNewClass is left unmodified.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_ILLEGAL_OPERATION | An illegal operation was requested, such as spawning a class from an instance. |
WBEM_E_INCOMPLETE_CLASS | The source class was not completely defined or registered with CIMOM, so a new derived class is not permitted. |
WBEM_E_INVALID_PARAMETER | ppNewClass is NULL. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
The new object returned in ppNewClass automatically becomes a subclass of the current object. This behavior cannot be overridden. There is no other method by which subclasses (derived classes) can be created.
You cannot create a derived class from a class that is local to your own client process. The superclass (base class) must be created and registered with CIMOM using IWbemServices::PutClass, and then retrieved using IWbemServices::GetObject_hmm_IWbemServices_GetObject before this method can be used to create a derived class.
To create a class hierarchy, you must create the initial class with IWbemServices::PutClass_hmm_IWbemServices_PutClass, retrieve it using IWbemServices::GetObject, and use the retrieved object to create the newly derived class. Then, this new derived class must be created using IWbemServices::PutClass. To create other derived classes, you must call IWbemServices::GetObject, then call IWbemClassObject::SpawnDerivedClass, and so on, in a cycle for each new derivation level. You must follow this procedure in order to prevent version errors and concurrency conflicts. See Class Creation_hmm_Declaring_Classes to create a class with no parent.
See Also
IWbemServices::GetObject_hmm_IWbemServices_GetObject, IWbemServices::PutClass_hmm_IWbemServices_PutClass
^# $ K + IWbemClassObject::SpawnInstance¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
Use the IWbemClassObject::SpawnInstance method to create a new instance of a class. The current object must be a class definition obtained from CIMOM using IWbemServices::GetObject_hmm_IWbemServices_GetObject, IWbemServices::CreateClassEnum_hmm_IWbemServices_CreateClassEnum, or IWbemServices::CreateClassEnumAsync_hmm_IWbemServices_CreateClassEnumAsync Then, use this class definition to create new instances.
A call to IWbemServices::PutInstance_hmm_IWbemServices_PutInstance is required to actually write the instance to CIMOM. If you intend to discard the object before calling IWbemServices::PutInstance, simply make a call to IWbemClassObject::Release_hmm_IWbemClassObject_Release
Note that spawning an instance from an instance is supported.
HRESULT IWbemClassObject::SpawnInstance(
[in] LONG lFlags,
[out] IWbemClassObject **ppNewInstance
);
Parameters
lFlags
Reserved. It must be zero.
ppNewInstance
Must not be NULL. It receives a new instance of the class. The caller must invoke IWbemClassObject::Release_hmm_IWbemClassObject_Release when the pointer is no longer required. On error, a new object is not returned and the pointer is left unmodified.
Return Values
WBEM_E_INCOMPLETE_CLASS | The current object is not a valid class definition and cannot spawn new instances. Either it is incomplete, or it has not been registered with CIMOM using PutClass. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_S_NO_ERROR | The call succeeded. |
See Also
IWbemServices::GetObject_hmm_IWbemServices_GetObject, IWbemServices::PutInstance_hmm_IWbemServices_PutInstance
^# $ K + IWbemClassObject::CompareTo¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::CompareTo method compares an object to another CIMOM object. Note that there are certain constraints in this comparison process.
HRESULT IWbemClassObject::CompareTo(
[in] LONG lFlags,
[in] IWbemClassObject *pCompareTo
);
Parameters
lFlags
Specifies the object characteristics to consider in comparison to other object. It can be WBEM_COMPARISON_INCLUDE_ALL to consider all features, or any combination of these flags:
WBEM_FLAG_IGNORE_OBJECT_SOURCE
The source of the objects, namely the server and the namespace they came from, are ignored in comparison to other objects.
WBEM_FLAG_IGNORE_QUALIFIERS
All qualifiers (including "key" and "dynamic") should be ignored in comparison.
WBEM_FLAG_IGNORE_DEFAULT_VALUES
Default values of properties should be ignored. This flag is only meaningful when comparing classes.
WBEM_FLAG_IGNORE_FLAVOR
Ignore qualifier flavors. This flag still takes qualifier values into account, but ignores flavor distinctions such as propagation rules and override restrictions (see Qualifier Flavors_hmm_qualifier_flavors).
WBEM_FLAG_IGNORE_CASE
Compares string values in a case-insensitive manner. This applies both to strings and to qualifier values. Property and qualifier names are always compared in a case-insensitive manner whether this flag is specified or not.
WBEM_FLAG_IGNORE_CLASS
This flag instructs the system to assume that the objects being compared are instances of the same class. Consequently, this flag compares instance-related information only. Use this flag to optimize performance. If the objects are not of the same class, the results are undefined.
pCompareTo
The object in comparison. This pointer must point to a valid IWbemClassObject instance. It cannot be NULL.
Return Values
WBEM_E_FAILED | An unspecified error has occurred.. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_S_DIFFERENT | The objects are different. |
WBEM_S_SAME | The objects are the same, subject to comparison flags. |
See Also
Qualifier Flavors_hmm_qualifier_flavors
^# $ K + IWbemClassObject::GetPropertyOrigin¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::GetPropertyOrigin method retrieves the name of the class in which a particular property was introduced. For classes with deep inheritance hierarchies, it is often desirable to know which properties were declared in which classes. If the object does not inherit from a parent class, as in the case of a base class, for example, then the current class name is returned.
HRESULT IWbemClassObject::GetPropertyOrigin(
[in] BSTR strName,
[out] BSTR *pstrClassName
);
Parameters
strName
The property name for which the owning class name is desired. This must point to a valid BSTR, which is treated as read-only.
pstrClassName
A pointer to the address of a new BSTR that receives the parent class name. To prevent memory leaks in the client process, the caller must call SysFreeString when the name is no longer needed. This parameter must not point to a valid string before the method is called because this is an output parameter, and this pointer will not be deallocated after the call is complete.
Return Values
WBEM_E_FAILED | There has been a general failure. |
WBEM_E_INVALID_PARAMTER | One or more parameters was not valid. |
WBEM_E_NOT_FOUND | The specified property does not exist. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_S_NO_ERROR | The call succeeded. |
See Also
IWbemClassObject::InheritsFrom_hmm_IWbemClassObject_InheritsFrom
^# $ K + IWbemClassObject::InheritsFrom¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
The IWbemClassObject::InheritsFrom method determines if the current class or instance derives from a specified parent class.
HRESULT IWbemClassObject::InheritsFrom(
[in] BSTR strAncestor
);
Parameters
strAncestor
Cannot be NULL. It contains the class name that is being tested. If the current object has this class for one of its ancestor classes, WBEM_S_NO_ERROR returns. This must point to a valid BSTR, which is treated as read-only.
Return Values
WBEM_S_NO_ERROR | The current object inherits from the specified ancestor class. |
WBEM_S_FALSE | The current object does not inherit from the specified ancestor class. |
WBEM_E_INVALID_PARAMETER | The strAncestor parameter is NULL. |
See Also
GetPropertyOrigin_hmm_IWbemClassObject_GetPropertyOrigin
^# $ K + IWbemClassObject::GetMethod¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
Returns information about the requested CIM Method. This call is only supported if the current object is a CIM class definition. CIM Method information is not available from IWbemClassObject pointers which point to CIM instances.
HRESULT IWbemClassObject::GetMethod(
[in] BSTR Name,
[in] LONG lFlags,
[out] IWbemClassObject **ppInSignature,
[out] IWbemClassObject **ppOutSignature
);
Parameters
Name
The CIM method name. Must point to a valid BSTR, which is treated as read-only.
lFlags
Reserved. It must be zero.
ppInSignature
Receives an IWbemClassObject pointer which describes the in-parameters to the method. This parameter can be set to NULL if this method has no in-parameters. See Notes.
ppOutSignature
Receives an IWbemClassObject pointer which describes the out-parameters to the method. This parameter will be ignored if set to NULL.
Return Values
WBEM_S_NO_ERROR | The requested in- and out-parameter objects were returned. |
WBEM_E_NOT_FOUND | The method did not exist. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the call. |
Remarks
For a CIM method, the in- and out-parameters are described as properties in IWbemClassObjects.
For example, consider the following CIM method:
Class MyClass{
[key] string KeyVal;
sint32 PropVal;
sint32 ExampleMethod([in] sint32 Parm1, [in] uint32 Parm2,
[out] string Parm3);
};
In this example, the class has a single method. When the user calls IWbemClassObject::GetMethod, the ppInSignature parameter will receive an IWbemClassObject, which contains two properties: Parm1 and Parm2. The ppOutSignature will contain a single property containing Parm3.
After filling in the property values of the ppInSignature object, the caller can use the object to execute the method by calling IWbemServices::ExecMethod or IWbemServices::ExecMethodAsync.
Note
The caller is responsible for calling IWbemClassObject::Release on the ppInSignature and ppOutSignature pointers when these objects are no longer needed.
See Also
IWbemClassObject::PutMethod_hmm_IWbemClassObject_PutMethod
Using CIM Methods
^# $ K + IWbemClassObject::PutMethod¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
Use this to create a CIM method. This call is only supported if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers which point to CIM instances.
The user may not create methods with names that begin or end with an underscore. This is reserved for system classes and properties.
HRESULT IWbemClassObject::PutMethod(
[in] BSTR Name,
[in] LONG lFlags,
[in] IWbemClassObject *pInSignature,
[in] IWbemClassObject *pOutSignature
);
Parameters
Name
The method name which is being created.
lFlags
Reserved. It must be zero.
pInSignature
Points to an IWbemClassObject containing the in-parameters for the method. This parameter will be ignored if set to NULL.
pOutSignature
Points to an IWbemClassObject containing the out-parameters for the object. This parameter will be ignored if set to NULL.
Return Values
WBEM_S_NO_ERROR | The requested in- and out-parameter objects were returned. |
WBEM_E_INVALID_PARAMETER | One or more parameters was invalid. |
WBEM_E_PROPAGATED_METHOD | An attempt was made to reuse an existing method name from a superclass, and the signatures did not match. |
WBEM_E_INVALID_DUPLICATE_PARAMETER | A duplicate parameter was specified in pInSignature and pOutSignature that did not have identical qualifier stes ([in] and [out] not withstanding. |
IDS_E_MISSING_PARAMETER_ID | A parameter was specified that did not have an [id] qualifier. |
IDS_E_INVALID_PARAMETER_ID | The [id] qualifiers on the parameters must be greater than 0, and VT_I4.. |
IDS_E_NONCONSECUTIVE_PARAMETER_IDS | The [id] qualifiers on the parameters (duplicates excepted) must be 0 based and contiguous. |
IDS_E_PARAMETER_ID_ON_RETVAL | The ReturnValue parameter had an [id] qualifier. |
Remarks
For a CIM method, the in- and out-parameters are described as properties in IWbemClassObjects.
For example, consider the following CIM method:
Class MyClass{
[key] string KeyVal;
sint32 PropVal;
sint32 ExampleMethod([in] sint32 Parm1, [in] uint32 Parm2,
[out] string Parm3);
};
In this example, the class has a single method. To create the method programmatically, the user calls IWbemClassObject::PutMethod with the ppInSignature parameter pointing to an IWbemClassObject, which contains two properties: Parm1 and Parm2. The ppOutSignature points to an object containing a single property containing Parm3.
In Parameters must have an [in] qualifier. Out parameters must have an [out] qualifier. For a parameter to be both in and out, it must exiist in both pInSignature and pOutSignature, the id qualifier must have the same value and all other qualifiers must be exactly the same, with the exception of the [in] and [out] qualifiers.
Also, all parameters must have an [id] qualifier. The ids of the parameters must be 0 based and contiguous. The only exception to this is the ReturnValue parameter (if it exists) in the pOutSignature, which cannot have an [id] qualifier.
Note
The caller is responsible for calling IWbemClassObject::Release on the ppInSignature and ppOutSignature pointers when these objects are no longer needed.
See Also
IWbemClassObject::GetMethod
Using CIM Methods
^# $ K + IWbemClassObject::DeleteMethod¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
Use this to delete a CIM method. This call is supported only if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers which point to CIM instances.
HRESULT IWbemClassObject::DeleteMethod(
[in] BSTR Name
);
Parameters
Name
The method name to be removed from the class definition.
Return Values
WBEM_S_NO_ERROR | The method was deleted from the CIM class definition.. |
WBEM_E_NOT_FOUND | The method did not exist. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the call. |
Remarks
You may not delete methods inherited from superclasses.
See Also
IWbemClassObject::GetMethod, IWbemClassObject::PutMethod
Using CIM Methods
^# $ K + IWbemClassObject::BeginMethodEnumeration¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
Use this call to begin an enumeration of the methods available for the object.
This call is only supported if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers which point to CIM instances.
HRESULT IWbemClassObject::BeginMethodEnumeration(
[in] LONG lEnumFlags
);
Parameters
lEnumFlags
Reserved. It must be zero.
Return Values
WBEM_E_INVALID_PARAMETER | A non-zero flag value was used. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
See Also
IWbemClassObject::NextMethod
^# $ K + IWbemClassObject::NextMethod¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
This is used to retrieve the next method in a method enumeration sequence started with IWbemClassObject::BeginMethodEnumeration.
This call is only supported if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers which point to CIM instances.
HRESULT IWbemClassObject::NextMethod(
[in] LONG lFlags,
[out, OPTIONAL] BSTR *pName,
[out, OPTIONAL] IWbemClassObject **ppInSignature,
[out, OPTIONAL] IWbemClassObject **ppOutSignature
);
Parameters
lFlags
Reserved. It must be zero.
pName
Should point to NULL prior to the call. Receives a BSTR containing the method name. The caller must release the string using SysFreeString when it is no longer required.
ppInSignature
Receives a pointer to an IWbemClassObject containing the in-parameters for the method.
ppOutSignature
Receives a pointer to an IWbemClassObject containing the out-parameters for the method.
Return Values
WBEM_E_UNEXPECTED | An internal error occurred. |
WBEM_S_NO_ERROR | The call succeeded. |
WBEM_S_NO_MORE_DATA | Returned when the enumeration sequence is complete. |
Remarks
The caller begins the enumeration sequence using IWbemClassObject::BeginMethodEnumeration, and then calls IWbemClassObject::NextMethod until WBEM_S_NO_MORE_DATA returns. The caller optionally finishes the sequence with IWbemClassObject::EndMethodEnumeration. The caller may terminate the enumeration early by calling IWbemClassObject::EndMethodEnumeration at any time.
Note
The caller is responsible for calling IWbemClassObject::Release on the ppInSignature and ppOutSignature pointers when these objects are no longer needed.
^# $ K + IWbemClassObject::EndMethodEnumeration¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
This is used to terminate a method enumeration sequence started with IWbemClassObject::BeginMethodEnumeration.
This call is only supported if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers, which point to CIM instances.
HRESULT IWbemClassObject::EndMethodEnumeration(
);
Parameters
None.
Return Values
WBEM_E_UNEXPECTED | An internal error occurred. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
The caller begins the enumeration sequence using IWbemClassObject::BeginMethodEnumeration, and then calls IWbemClassObject::NextMethod until WBEM_S_NO_MORE_DATA returns. The caller optionally finishes the sequence with IWbemClassObject::EndMethodEnumeration. The caller may terminate the enumeration early by calling IWbemClassObject::EndMethodEnumeration at any time.
See Also
Using CIM Methods.
^# $ K + IWbemClassObject::GetMethodQualifierSet¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
This is used to terminate retrieve the qualifier set for a particular method.
This call is supported only if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers, which point to CIM instances.
HRESULT IWbemClassObject::GetMethodQuailifierSet(
[in] BSTR Method,
[out] IWbemQualifierSet **ppQualSet
);
Parameters
Method
Must point to a valid BSTR containing the method name.
ppQualSet
Receives the interface pointer that allows access to the qualifiers for the method. The returned object has a positive reference count upon return from the call. The caller must call IWbemQualifierSet::Release_hmm_IWbemQualifierSet_Release when the object is no longer needed. This parameter cannot be NULL. On error, a new object is not returned, and the pointer is set to point to NULL.
Return Values
WBEM_E_NOT_FOUND | The method did not exist. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
Since each method may have its own qualifiers, use this call to retrieve the IWbemQualifierSet pointer, which allows the caller to add, edit, or delete such qualifiers.
See Also
Using CIM Methods
^# $ K + IWbemClassObject::GetMethodOrigin¦@¦
<span style=color:#FF0000>[This is preliminary documentation and subject to change.]</span>
This is used to determine for which class a method was declared.
This call is only supported if the current object is a CIM class definition. CIM Method manipulation is not available from IWbemClassObject pointers which point to CIM instances.
HRESULT IWbemClassObject::GetMethodOrigin(
[in] BSTR strMethodName,
[out BSTR strClassName
);
Parameters
strMethodName
The name of the method for the object whose owning class is being requested.
strClassName
Receives the name of the class which owns the method. The user must call SysFreeString on the returned BSTR when it is no longer required.
Return Values
WBEM_E_NOT_FOUND | The method did not exist. |
WBEM_E_INVALID_PARAMETER | One or more parameters was not valid. |
WBEM_S_NO_ERROR | The call succeeded. |
Remarks
Since methods are inherited from class to class, it is often desirable to determine the owning class for a given method.
See Also
Using CIM Methods