18.104.22.168.9 Invoking Asynchronous Operations
The methods providing asynchronous behaviors are as follows:
If the client wants to invoke any of the above asynchronous methods, the client MUST pass an object implementing IWbemObjectSink interface to the above method calls as a response handler.
When the method invocation succeeds, the client SHOULD wait for the result of the operation to be returned to the client using IWbemObjectSink::Indicate and IWbemObjectSink::SetStatus on the IWbemObjectSink passed to the asynchronous method.
When the IWbemServices method invocation fails, the result of the operation is returned as a return value of the method.
After the IWbemServices asynchronous method invocation succeeds, if the client wants to cancel the pending asynchronous operation the client MUST call IWbemServices::CancelAsyncCall method. If the client calls IWbemServices::CancelAsyncCall, the client MUST pass the IWbemObjectSink passed to the asynchronous IWbemServices method that is still pending. The client MUST NOT call IWbemServices::CancelAsyncCall from within a call to IWbemObjectSink::Indicate or IWbemObjectSink::SetStatus.