DWbemClassObject.Delete

[This is preliminary documentation and subject to change.]

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

It is not possible to delete a property that was inherited from a parent class. However, if you specified an override default value for a property inherited from a parent class, 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. You cannot delete System properties.

DWbemClassObject.Delete(
  [in] Name As String 
) As Long
 

Parameters

Name
String containing the property name to delete.

Return Values

WBEM_E_FAILED Unspecified error.
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 tried 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