ICatalogManager3::RemovePropertyValue Method [C++]

Use this method to remove a defined value from an enumeration property.

Definition

[C++]

HRESULT ICatalogManager3::RemovePropertyValue(BSTRstrPropertyName,
  BSTRstrLegalValue,
  BSTRstrLang);

[Visual Basic]

Sub RemovePropertyValue(strPropertyName As String,
  strLegalValue As String,
  Optional strLang As String)

Parameters

  • strPropertyName[C++]
    [in] A BSTR that contains the name of the enumeration property from which the specified value will be removed.
  • strPropertyName[Visual Basic]
    A String that contains the name of the enumeration property from which the specified value will be removed.
  • strLegalValue[C++]
    [in] A BSTR that contains the defined value to be removed as a choice from the specified enumeration property.
  • strLegalValue[Visual Basic]
    A String that contains the defined value to be removed as a choice from the specified enumeration property.
  • strLang[C++]
    [in, optional] A BSTR that contains the culture name. The culture name follows the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>" where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. Some culture names have prefixes that specify the script; for example, "Cy" specifies the Cyrillic script, and "Lt" specifies the Latin script. For more information, see . Table of Language Culture Names, Culture Codes, and ISO Values.
  • strLang[Visual Basic]
    A String that contains the culture name. The culture name follows the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>" where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. Some culture names have prefixes that specify the script; for example, "Cy" specifies the Cyrillic script, and "Lt" specifies the Latin script. For more information, see . Table of Language Culture Names, Culture Codes, and ISO Values.

Return Values

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

[Visual Basic] None.

Error Values

[C++] 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.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM 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.

Name Value Description
E_CAT_CATMGR_NOT_INITIALIZED

[C++] 0x889800B

[Visual Basic] &H8898005

The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method
E_CAT_INVALID_PROPERTY_NAME

[C++] 0x889800A

[Visual Basic] &H8898002

The property name you specified is invalid. Property names cannot be blank and cannot exceed 100 characters. Property names cannot begin with a digit and cannot contain one of the following five reserved characters .,"[]
E_CAT_INVALID_PARAMETER

[C++] 0x889800B

[Visual Basic] &H8898006

The input parameter <parameter number> is invalid.
E_CAT_INVALID_ENUMERATED_VALUE

[C++] 0x889800E

[Visual Basic] &H8898009

The value you specified for the enumerated property exceeds 128 characters
E_CAT_PROP_DOESNT_EXIST

[C++] 0x8898000

[Visual Basic] &H8898005

The property name you specified does not exist.
E_CAT_PROP_NOT_ENUM

[C++] 0x8898000

[Visual Basic] &H8898007

The property you specified is not the "cscEnumeration" data-type. This operation can only be performed on these types of Properties.

[C++] 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.

[Visual Basic] Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

When a value is removed from an enumeration type property all products that have that property set to that value will have the value changed to NULL.

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

[Visual Basic]

Example

myCatalogManager.RemovePropertyValue "Color", "blue_in_fr", "fr"

See Also

[C++]CatalogManager Object

[Visual Basic]CatalogManager Object

[C++]ICatalogManager3::AddPropertyValue

[Visual Basic]CatalogManager.AddPropertyValue

[C++]ICatalogManager3::GetPropertyValues

[Visual Basic]CatalogManager.GetPropertyValues

[C++]Table of Language Culture Names, Codes, and ISO Values

[Visual Basic]Table of Language Culture Names, Codes, and ISO Values

Copyright © 2005 Microsoft Corporation.
All rights reserved.