IWbemClassObject::GetPropertyOrigin

[This is preliminary documentation and subject to change.]

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 always returned.

HRESULT IWbemClassObject::GetPropertyOrigin(
  [in] BSTR bstrName, 
  [out] BSTR *pbstrClassName  
);
 

Parameters

bstrName
The property name for which the parent class name is desired. This must point to a valid BSTR, which is treated as read-only.
pbstrClassName
A pointer to the address of a new BSTR that contains the parent class name. To prevent memory leaks in the client process, the caller must call SysFreeString when the name is no longer needed. Since this is an OUT parameter, the pointer must not previously point to a valid string, since the pointer will not be deallocated.

Return Values

WBEM_E_FAILED 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_NO_ERROR Success.

See Also

IWbemClassObject::InheritsFrom