Share via


ICatalogManager3::RemovePropertyAttribute Method [C++]

Use this method to remove a custom property attribute from the Product Catalog System.

Definition

[C++]

HRESULT ICatalogManager3::RemovePropertyAttribute(BSTRstrAttrName);

[Visual Basic]

Sub RemovePropertyAttribute(strAttrName As String)

Parameters

  • strAttrName[C++]
    [in]A BSTR that contains the name of the attribute to be removed.
  • strAttrName[Visual Basic]
    A String that contains the name of the attribute to be removed.

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 standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. 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] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

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

Name Value Description
E_CAT_CATMGR_NOT_INITIALIZED

[C++] 0x889800B5

[Visual Basic] &H889800B5

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

[C++] 0x88980117

[Visual Basic] &H88980117

The attribute name you specified is invalid. Attribute names cannot be blank and cannot exceed 36 characters. Attribute names cannot begin with a digit and cannot contain one of the following five reserved characters .,"[]
E_CAT_INVALID_DATATYPE

[C++] 0x88980074

[Visual Basic] &H88980074

The datatype you specified is invalid
E_CAT_INVALID_PARAMETER

[C++] 0x889800B6

[Visual Basic] &H889800B6

The input parameter <parameter number> is invalid.
E_CAT_INVALID_COLUMN_LENGTH

[C++] 0x88980040

[Visual Basic] &H88980040

The length specified for this property is not between 1 and 4000.
E_CAT_BUILTIN_ATTRIBUTE

[C++] 0x889800A7

[Visual Basic] &H889800A7

The property attribute that you specified is a built in attribute and hence cannot be added or removed from the Product Catalog System.
E_CAT_INVALID_PROPERTY_NAME

[C++] 0x889800A2

[Visual Basic] &H889800A2

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_ATTRIBUTE_DOES_NOT_EXIST

[C++] 0x88980111

[Visual Basic] &H88980111

The property attribute that you specified does not exist

Remarks

Only custom attributes may be removed.

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

[Visual Basic]

Example

myCatalogManager.RemovePropertyAttribute("DisplayType")

See Also

[C++]CatalogManager Object

[Visual Basic]CatalogManager Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.