3.1.4.3.9 IWbemServices::DeleteClassAsync (Opnum 11)
The IWbemServices::DeleteClassAsync method is the asynchronous version of the IWbemServices::DeleteClass method. The DeleteClassAsync method MUST delete a specified class from the namespace.
-
HRESULT DeleteClassAsync( [in] const BSTR strClass, [in] long lFlags, [in] IWbemContext* pCtx, [in] IWbemObjectSink* pResponseHandler );
strClass: MUST be the name of the class to delete. This parameter MUST NOT be NULL.
lFlags: Specifies the behavior of the DeleteClassAsync method. Flag behavior MUST be interpreted as specified in the following table.
-
Value
Meaning
WBEM_FLAG_SEND_STATUS
0x00000080
If this bit is not set, the server MUST make one final IWbemObjectSink::SetStatus call on the interface pointer that is provided in the pResponseHandler parameter.
If this bit is set, the server MAY make intermediate IWbemObjectSink::SetStatus calls on the interface pointer prior to call completion.
-
Any other DWORD value that does not match the preceding condition MUST be treated as not valid.
pCtx: MUST be a pointer to an IWbemContext interface, which MUST contain additional information that the client wants to pass to the server. If pCtx is NULL, the parameter MUST be ignored.
pResponseHandler: MUST be a pointer to an IWbemObjectSink interface object that is implemented by the client of this method. This parameter MUST NOT be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11) to indicate the successful completion of the method.
-
WBEM_S_NO_ERROR (0x00)
The following validation occurs before asynchronous operation is started:
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The server SHOULD enforce a maximum length for the strClass parameter and return WBEM_E_QUOTA_VIOLATION if the limit is exceeded.<39>
The requirements mentioned in the parameter definitions are also checked before starting the asynchronous operation.
If successful, the server MUST create a new entry in AsyncOperationTable as specified in section 3.1.1.1.3.
The following validation occurs asynchronously:
If the CIM class being deleted is dynamic, the security principal that makes the call MUST have WBEM_WRITE_PROVIDER access to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
If the CIM class being deleted is static, the security principal that makes the call MUST have WBEM_FULL_WRITE access to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
If the CIM class being deleted is dynamic, the server MUST obtain SupportsDelete for the given provider in the ProviderTable. If SupportsDelete is FALSE, the server MUST return WBEM_E_PROVIDER_NOT_CAPABLE.
In response to the IWbemServices::DeleteClassAsync method, the server MUST evaluate the strClass parameter (specified in this section) and MUST delete strClass from the current namespace. The server MUST delete all the instances of the class and recursively delete all the derived classes. The method MUST fail if the following applies: if strClass does not exist; if the method parameters or their combinations are not valid as previously specified; or if the server is unable to execute the method.
If a new class is deleted, the corresponding entries for the class and the derived classes MUST be deleted from the ClassTable.
The server MUST generate a __ClassDeletionEvent event object upon successfully deleting the class information.