IWbemCallResult::GetResultObject

[This is preliminary documentation and subject to change.]

The IWbemCallResult::GetResultObject method returns the object. This results from a semisynchronous invocation of IWbemServices::GetObject or IWbemServices::ExecMethod. If the object is not yet available, the call returns WBEM_S_PENDING. Also, before invoking this method to get the resultant object, you may call IWbemCallResult::GetCallStatus until it returns WBEM_NO_ERROR.

HRESULT GetResultObject(
  [in] LONG lTimeout,
  [out] IWbemClassObject **ppResultObject
);
 

Parameters

lTimeout
Specifies the maximum time in milliseconds you must wait for the call to return. If you use the Win32® constant INFINITE (0xFFFFFFFF), the call will block until the object is available. If you use zero, the call immediately returns either the object or a status code.
ppResultObject
This parameter cannot be NULL. It receives the copy of the object when it becomes available. You must call IWbemClassObject::Release on the returned object when the object is no longer required.

A new object is not returned on error.

Return Values

WBEM_NO_ERROR The object successfully returned .
WBEM_S_PENDING The object was not yet available after the lTimeout value expired.
WBEM_E_NOT_FOUND The object did not exist.
WBEM_E_UNEXPECTED The call failed, and it is not expected to complete.
WBEM_E_TRANSPORT_FAILURE The remote or network connection to CIMOM has failed.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_ACCESS_DENIED The caller attempted an unauthorized operation.

On error, you can call the COM function GetErrorInfo to obtain more error information.

See Also

IWbemServices::GetObject IWbemServices::ExecMethod.