[This is preliminary documentation and subject to change.]
The IWbemServices::PutInstance method creates or updates an instance of a class object to CIMOM.
HRESULT IWbemServices::PutInstance(
[in] IWbemClassObject *pInst,
[in] LONG lFlags,
[in] IWbemContext *pCtx,
[out, OPTIONAL] IWbemCallResult **ppCallResult
);
WBEM_E_ACCESS_DENIED | The current user does not have permission to update an instance of the specified class. |
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 may not be NULL, such as one that is marked by a key, indexed, or not_null qualifier. |
WBEM_E_INVALID_OBJECT | The specified instance is invalid (for example, PutInstance with a Class will invoke this return). |
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_TRANSPORT_FAILURE | The communications link between the client and CIMOM has failed. |
WBEM_NO_ERROR | The call succeeded. |
IWbemCallResult, IWbemServices::PutInstanceAsync, Instance Creation and Modification Rules