IWbemObjectSink::SetStatus

[This is preliminary documentation and subject to change.]

The IWbemObjectSink::SetStatus method is called by sources to indicate the end of a notification sequence or the end of a result code of an asynchronous method of IWbemServices.

Normally, a client implements the IWbemObjectSink interface, and executes IWbemServices methods that return their results using this interface. During this operation, CIMOM calls Indicate as many times as required, followed by a final call to SetStatus, and in many cases, Release.

HRESULT IWbemObjectSink::SetStatus(
  [in] LONG lFlags,
  [in] HRESULT hResult, 
  [in] BSTR bstrParam, 
  [in] IWbemClassObject *pObjParam
);
 

Parameters

lFlags
Reserved. It must be zero.
hResult
Set to the HRESULT of the asynchronous operation or notification. This is typically one of the WBEM_E_ error codes or WBEM_S_ status codes.
bstrParam
Receives a pointer to a read-only BSTR, if the original asynchronous operation returns a string. For example, when using PutInstanceAsync, IWbemObjectSink::SetStatus is called with this parameter set to the object path of the newly created instance.
pObjParam
In cases where a complex error or status object is returned, this contains a pointer to the object. If the object is required after the call returns, the called object must AddRef the pointer before returning.

Return Values

WBEM_E_FAILED The receiver was not able to process the notification properly.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_OUT_OF_MEMORY There was not enough memory to complete the operation.
WBEM_NO_ERROR The call succeeded; the receiver acknowledges the notification.