3.1.4.5.2 IWbemCallResult::GetResultString (Opnum 4)

When the IWbemCallResult::GetResultString method is called, the server MUST return the assigned CIM path of a CIM instance that was created by the IWbemServices::PutInstance method that returned IWbemCallResult in the ppCallResult parameter.

 HRESULT GetResultString(
   [in] long lTimeout,
   [out] BSTR* pstrResultString
 );

lTimeout: MUST be a maximum amount of time, in milliseconds, that the call to GetResultString allows to pass before timing out. If the constant WBEM_INFINITE (0xFFFFFFFF) is used, the GetResultString method call MUST wait until the operation succeeds. This parameter MUST NOT be NULL.

pstrResultString: MUST be a pointer to a BSTR value, which MUST contain the CIM path of the CIM object instance, which MUST lead to the CIM instance that was created using IWbemServices::PutInstance. In case of failure of the semisynchronous operation, the returned string MUST be NULL. When sent by the client, this pointer parameter MUST NOT be NULL. If the original operation does not return a string, the returned string MUST be NULL.

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::GetResultString method MUST be called on the interface obtained in responses to a previous call to a semisynchronous operation returning an IWbemCallResult interface.

IWbemCallResult::GetResultString MUST be called to obtain the CIM path created after IWbemServices::PutInstance execution. In response to the IWbemCallResult::GetResultString method, the server MUST wait for the operation to finish in lTimeout time. The operation is finished when OperationFinished is TRUE. If the operation is not finished in lTimeout time, the server MUST return WBEM_S_TIMEDOUT. If the operation is finished successfully in lTimeout time, the server MUST make a copy of the ResultString in WbemCallResultTable for this operation and return it in the pstrResultString parameter. 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. If the operation is finished successfully, and if ResultString is set to NULL, the server MUST return WBEM_E_INVALID_OPERATION for this method.

The successful method execution MUST fill pstrResultString with a string value of type BSTR and MUST return WBEM_S_NO_ERROR.

The failed method execution sets the value referenced by the output parameters to NULL and MUST return an error in the format specified in section 2.2.11. In case the operation is not completed after lTimeout milliseconds, the server MUST return WBEM_S_TIMEDOUT and MUST allow for further retries to be made.

If the original semisynchronous operation fails, the IWbemCallResult::GetResultString method MUST return the error code that the original method would have returned in its synchronous version.