3.1.4.5.3 IWbemCallResult::GetResultServices (Opnum 5)

When the IWbemCallResult::GetResultServices method is called, the server MUST retrieve a pointer to the IWbemServices interface that results from a semisynchronous call to the IWbemServices::OpenNamespace method.

 HRESULT GetResultServices(
   [in] long lTimeout,
   [out] IWbemServices** ppServices
 );

lTimeout: MUST be the time, in milliseconds, that the call to GetResultServices allows to pass before timing out. If the constant WBEM_INFINITE (0xFFFFFFFF) is used, the Skip method call MUST wait until the operation succeeds.

ppServices: MUST be a pointer to the IWbemServices interface that is requested by the original call to IWbemServices::OpenNamespace when that interface becomes available. If the semisynchronous operation fails, the returned parameter MUST be NULL. When sent by the client, this pointer parameter MUST NOT be NULL. If the original operation does not return an interface pointer, the returned parameter 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::GetResultServices method MUST be called on the interface that is obtained in response to a previous call to a semisynchronous operation that returns an IWbemCallResult interface.

IWbemCallResult::GetResultServices MUST be called to obtain the IWbemServices interface pointer that is returned by the IWbemServices::OpenNamespace execution. In response to the IWbemCallResult::GetResultServices 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 return the IWbemServices interface pointer result stored in ResultService of the operation in the ppServices 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.

 The successful method execution MUST fill the ppServices parameter with an IWbemServices interface pointer and MUST return WBEM_S_NO_ERROR.

The failed method execution sets the value that is referenced by the output parameters to NULL and MUST return an error in the format that is specified in section 2.2.11. If the operation does not complete within 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::GetResultServices method MUST return the error code that the original method would have returned in its synchronous version.