[This is preliminary documentation and subject to change.]
The IWbemServices::DeleteClassAsync method deletes the specified class from the current namespace. This method is identical to IWbemServices::DeleteClass except that the call returns immediately. Confirmation or failure is asynchronously reported to the specified object sink using the IWbemObjectSink::SetStatus method after the operation has completed.
HRESULT IWbemServices::DeleteClassAsync(
[in] BSTR bstrClass,
[in] LONG lFlags,
[in] IWbemContext *pCtx,
[in] CALLBACK *pResponseHandler
);
WBEM_E_FAILED | Other unspecified failures. |
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_E_TRANSPORT_FAILURE | The communications link between the current process and CIMOM has failed. |
WBEM_NO_ERROR | The call succeeded. |
All other return codes are provided to the object sink specified by the pReponseHandler parameter through the SetStatus method. Error conditions, such as when the class does not exist or the user does not have permission to delete classes, are reported to the handler. They are not reported in the return code of this method.
If a dynamic instance provider is associated with the class, the provider is unregistered, and is no longer called for that class. Any classes that derive from the deleted class are also deleted, and their associated providers become unregistered. All outstanding static instances of the specified class and its subclasses are also deleted when the class is deleted.
If the class is provided by a dynamic class provider, the success of the deletion depends on whether class deletion is supported by that provider.
Note Standard system classes cannot be deleted.
Asynchronous Methods, IWbemServices::DeleteClass