3.1.4.3.2 IWbemServices::CancelAsyncCall (Opnum 4)

The IWbemServices::CancelAsyncCall method cancels a currently pending asynchronous method call identified by the IWbemObjectSink pointer passed to the initial asynchronous method.

 HRESULT CancelAsyncCall(
   [in] IWbemObjectSink* pSink
 );

pSink: MUST be a pointer to the IWbemObjectSink interface object that was passed to the asynchronous method that the client wants to cancel. This parameter MUST NOT 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 (as specified in section 2.2.11) to indicate the successful completion of the method.

Return value/code

Description

0x00

WBEM_S_NO_ERROR

Indicates a successful completion to the method call.

In response to the IWbemServices::CancelAsyncCall method, the server MUST identify and cancel all pending asynchronous operations initiated by an asynchronous method execution, such as IWbemServices::GetObjectAsync, which used the pSink interface pointer parameter as their response handler. The server MUST return an error if the interface pointer is NULL, and it MUST return an error if the pSink parameter is not associated with an entry in AsyncOperationTable.

As part of the IWbemServices::CancelAsyncCall method, the server MUST set the CallCancelled value for this asynchronous operation entry in the AsyncOperationTable to TRUE. Setting CallCancelled to TRUE ensures that no new IWbemObjectSink::Indicate messages or progress messages using IWbemObjectSink::SetStatus are called to the client. If SetStatusWithFinalResultCalled is FALSE, the server MUST set SetStatusWithFinalResultCalled to TRUE and return the error WBEM_E_CALL_CANCELLED.

The server MUST NOT wait for any response from the client to complete the cancellation to prevent protocol performance degradation.

The successful method execution MUST return WBEM_S_NO_ERROR.

The failed method execution MUST return an error in the format specified in section 2.2.11.