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 GetObjectText( long lFlags, BSTR *pstrObjectText );
Normally 0. If WBEM_FLAG_NO_FLAVORS is specified, qualifiers will be presented without propagation or flavor information.
This must point to NULL on entry. This parameter receives from Windows Management a newly allocated BSTR that was initialized with SysAllocString. You 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. Because 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.
This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT. For general HRESULT values, see System Error Codes.
The following algorithm is used to reconstruct the text of the parameters of a method:
- Parameters are resequenced in the order of their identifier values.
- Parameters that are specified as [in] and [out] will be combined into a single parameter.
|Windows version||Windows Vista Windows Server 2008|
|Header||wbemcli.h (include Wbemidl.h)|
|DLL||CIMWin32.dll; Esscli.dll; Fastprox.dll; FrameDyn.dll; FrameDynOS.dll; Krnlprov.dll; Ncprov.dll; Wbemcore.dll; Wbemess.dll; Wmipiprt.dll|