DIWbemServices.PutInstanceAsync

[This is preliminary documentation and subject to change.]

The DIWbemServices.PutInstanceAsync method performs the same task as DIWbemServices.PutInstance, except that the call returns immediately. and update confirmation or error reporting is provided to the specified response handler.

DIWbemServices.PutInstanceAsync(
  [in]DWbemClassObject pInst As Object,          
  [in] lFlags As Long,                    
  [in] pCtx  As Object,              
  [in] pResponseHandler As Object   
) As Long
 

Parameters

pInst
The instance of DWbemClassObject to be written to the repository.
lFlags
If WBEM_FLAG_CREATE_OR_UPDATE, the instance is created if it does not exist or overwritten if it already exists. If WBEM_FLAG_UPDATE_ONLY, the instance must exist and this call constitutes an update. If WBEM_FLAG_CREATE_ONLY, this call is for creation only, and the call fails if the instance already exists.
pCtx
Typically NOTHING. Otherwise, this is a DWbemContext object required by the dynamic class provider that is producing the class instances. The values in the context object must be specified in the documentation for the provider in question.
pResponseHandler
The caller's implementation of DIWbemObjectSink. This handler receives the status of theDWbemClassObject.Put operation when you use the DIWbemObjectSink.SetStatus method.

For a detailed explanation of this parameter, see Asynchronous Methods.

Return Values

WBEM_E_ALREADY_EXISTS WBEM_FLAG_CREATE_ONLY flag was specified, but the instance already exists.
WBEM_E_FAILED Unspecified error.
WBEM_E_ILLEGAL_NULL A value of NULL 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 Success.

See Also

Asynchronous Methods, DWbemContext, DIWbemServices.PutInstance, Instance Creation and Modification Rules