[This is preliminary documentation and subject to change.]
The IWbemServices::PutInstanceAsync method performs the same task as IWbemServices::PutInstance except that the call returns immediately, and update confirmation or error reporting is provided to the specified response handler.
HRESULT IWbemServices::PutInstanceAsync(
[in] IWbemClassObject pInst,
[in] LONG lFlags,
[in] IWbemContext *pCtx,
[in] CALLBACK *pResponseHandler
);
For a detailed explanation of this parameter, see Asynchronous Methods. CIMOM only calls AddRef on the pointer in cases where WBEM_NO_ERROR is returned. In cases where an error code is returned, the reference count is the same as on entry.
WBEM_E_ALREADY_EXISTS | WBEM_FLAG_CREATE_ONLY flag was specified, but the instance already exists. |
WBEM_E_FAILED | Other unspecified errors. |
WBEM_E_ILLEGAL_NULL | A NULL value was specified for a property that is not NULL, such as one marked by a key, indexed, or not_null qualifier. |
WBEM_E_INVALID_CLASS | The specified class was invalid. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified, or the namespace could not be parsed. |
WBEM_E_NOT_FOUND | WBEM_FLAG_UPDATE_ONLY flag was specified, but the instance does not exist. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_RPC_FAILURE | The RPC link between the client and CIMOM has failed. |
WBEM_NO_ERROR | The call succeeded. |
Asynchronous Methods, IWbemContext, IWbemServices::PutInstance, Instance Creation and Modification Rules