3.1.4.5.1 IWbemCallResult::GetResultObject (Opnum 3)
When the IWbemCallResult::GetResultObject method is called, the server MUST attempt to retrieve a CIM object from a previous semisynchronous operation call to the IWbemServices::GetObject method or the IWbemServices::ExecMethod method. The entry in WbemCallResultTable with WbemCallResultPointer pointing to IWbemCallResult is used to identify the previous semisynchronous call.
-
HRESULT GetResultObject( [in] long lTimeout, [out] IWbemClassObject** ppResultObject );
lTimeout: MUST be the maximum amount of time, in milliseconds, that the call to the IWbemCallResult::GetResultObject method allows to pass before it times out. If the constant WBEM_INFINITE (0xFFFFFFFF) is used, the GetResultObject method call MUST wait until the operation succeeds. If this parameter is set to 0 and the result object is available at the time of the method call, the object MUST be returned in ppResultObject and WBEM_S_NO_ERROR MUST also be returned. If this parameter is set to 0 but the result object is not available at the time of the method call, WBEM_S_TIMEDOUT MUST be returned.
ppResultObject: A pointer to a variable that receives a logical copy of the CIM object when the semisynchronous operation is complete. A new CIM object MUST NOT be returned on error. When sent by the client, this parameter value MUST NOT be NULL. Upon return by the server, this parameter value can be NULL if there is a failure or if there are no results. The caller of this method MUST call IWbemClassObject::Release on the returned object when the object is no longer required.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the successful completion of the method.
-
WBEM_S_NO_ERROR (0x00)
The server MUST locate the entry in WbemCallResultTable with WbemCallResultPointer matching IWbemCallResult.
The IWbemCallResult::GetResultObject method MUST be called on the interface obtained in responses to a previous call to a semisynchronous operation returning an IWbemCallResult interface.
In response to the IWbemCallResult::GetResultObject method, the server MUST wait for the operation to finish by waiting up to lTimeout for OperationFinished to become TRUE for this operation entry in WbemCallResultTable. If the operation is finished successfully in lTimeout time, the server MUST return the CIM object in the ppResultObject parameter by making a logical copy of ResultObject. If the operation is not finished in lTimeout time, the server MUST return WBEM_S_TIMEDOUT. The method MUST fail if the method parameters are not valid, as specified earlier in this section, or if the server is unable to execute the method.
The successful method execution MUST fill ppResultObject with an IWbemClassObject interface pointer and MUST return WBEM_S_NO_ERROR.
If the operation is not finished in lTimeout time, this method MUST set the value referenced by the output parameters to NULL and return WBEM_S_TIMEDOUT. The client is allowed to retry the operation.
If the operation fails within lTimeout time, the server MUST set the value referenced by the output parameters to NULL and return the error code that the original method would have returned in its synchronous version in the format specified in section 2.2.11.