IWbemClassObject::GetObjectText

[This is preliminary documentation and subject to change.]

The IWbemClassObject::GetObjectText method returns a textual rendering of the object. Currently, only Managed Object Format (MOF) syntax is supported as an output format. 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 *pbstrObjectText
);
 

Parameters

lFlags
Reserved. It must be set to zero.
pbstrObjectText
This must point to NULL on entry. This parameter receives 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 previously point to a valid string, since the pointer is not be deallocated.

Return Values

WBEM_E_FAILED Other unspecified failures.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_OUT_OF_MEMORY There was not enough memory to complete the operation.
WBEM_NO_ERROR Success.

See Also

IWbemQualifierSet