[This is preliminary documentation and subject to change.]
The DIWbemServices.DeleteInstanceAsync method performs the same function as DIWbemServices.DeleteInstance, except that the call returns immediately. The success or failure of the operation is asynchronously reported to the supplied object sink through the DIWbemObjectSink.SetStatus method.
If a dynamic provider supplied the instance, it is sometimes not possible to delete the instance unless the provider supports instance deletion.
DIWbemServices.DeleteInstanceAsync(
[in] ObjectPath As String,
[in] lFlags As Long,
[in] pCtx As Object,
[in] pResponseHandler As Object
) As Long
WBEM_E_FAILED | Unspecified error. |
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_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_NO_ERROR | Success. |
For more information on return values see Visual Basic error handeling and return values
Other error conditions are reported asynchronously to the object sink supplied by the pResponseHandler parameter.
Asynchronous Methods, DIWbemServices.DeleteInstance, Object Paths