SWbemLastError.GetObjectText_ method

The GetObjectText_ method of the SWbemLastError object returns a textual rendering of the object in a Managed Object Format (MOF) format. This MOF object can be used to display an object's contents. Notice that the MOF text that is 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, you will not find any information about the propagated qualifiers or the parent class properties.

For an explanation of this syntax, see Document Conventions for the Scripting API.

Syntax

strMofText = .GetObjectText_( _
  [ ByVal iFlags ] _
)

Parameters

iFlags [in, optional]

This parameter is reserved and must be 0 (zero) if specified.

Return value

If successful, this method returns a string that contains the output text.

Error codes

Upon the completion of the GetObjectText_ method, the Err object may contain one of the error codes in the following list.

wbemErrFailed - 2147749889 (0x80041001)

Unspecified error.

wbemErrInvalidParameter - 2147749896 (0x80041008)

A specified parameter is not valid.

wbemErrOutOfMemory - 2147749894 (0x80041006)

Not enough memory to complete the operation.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemdisp.h
Type library
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemLastError
IID
IID_ISWbemLastError