IWbemClassObject::Delete

[This is preliminary documentation and subject to change.]

The IWbemClassObject::Delete method deletes the specified property and all of its qualifiers. Since instances cannot have contents that are different from the owning class, delete operations for properties are only possible on class definitions. .

It is not possible to delete a property that was inherited from a parent class. However, if an override default value for a property inherited from a parent class was specified, it is possible to revert to the parent's default value by invoking this method. In this case, WBEM_S_RESET_TO_DEFAULT is returned. System properties cannot be deleted.

HRESULT IWbemClassObject::Delete(
  [in] BSTR bstrName  
);
 

Parameters

bstrName
The property name to delete. This must point to a valid BSTR. It is treated as read-only.

Return Values

WBEM_E_FAILED General failure.
WBEM_E_INVALID_PARAMETER An invalid Name was specified.
WBEM_E_NOT_FOUND The specified property does not exist.
WBEM_E_OUT_OF_MEMORY There was not enough memory to complete the operation.
WBEM_E_PROPAGATED_PROPERTY The user attempted to delete a property that was not owned. The property was inherited from a parent class.
WBEM_NO_ERROR Success.
WBEM_S_RESET_TO_DEFAULT The caller deleted an override default value for the current class. The default value for this property in the parent class has been reactivated.

See Also

System Properties