ICatalogManager::RemoveDefinitionProperty

Ee824875.c++_off(en-US,CS.10).gifEe824875.vb_on(en-US,CS.10).gif

Use this method to remove the specified property or variant property from the specified definition.

Definition

HRESULT ICatalogManager::RemoveDefinitionProperty(BSTRstrDefinitionName,BSTRstrPropertyName);

Parameters

strDefinitionName

[in] A BSTR that contains the name of the definition for which the specified property will be removed.

strPropertyName

[in] A BSTR that contains the name of the property to be removed.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_CAT_DEFINITION_DOESNT_EXIST 0x8898000B The specified definition did not exist.
E_CAT_PROP_NOT_IN_DEFINITION 0x8898000E The specified property was not included in this definition.

Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

When you remove a property from a definition, it is also removed from any products, product-variants, or categories created from that definition.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Ee824875.note(en-US,CS.10).gifCaution

  • Use caution when using this method. In most cases, calling this method results in the deletion of data.

  • Removing the last variant property in a product family definition will convert it to a product definition and will remove all existing product variants based on this definition.

See Also

CatalogManager Object

ICatalogManager::AddDefinitionProperty

ICatalogManager::AddDefinitionVariantProperty

ICatalogManager::GetDefinitionProperties


All rights reserved.