ICatalogManager3::GetAttributes Method [C++]
Use this method to retrieve the catalog or property attributes in the Product Catalog System.
Definition
[C++]
HRESULT ICatalogManager3::GetAttributes(CatalogAttributesEnumeAttributeType,
VARIANT_BOOLfUserDefinedOnly,
_Recordset**ppRSAttributes);
[Visual Basic]
Function GetAttributes(eAttributeType As CatalogAttributesEnum,
Optional fUserDefinedOnly As Boolean) As Recordset
Parameters
- eAttributeType[C++]
[in] A CatalogAttributesEnum enumeration that specifies whether to return catalog or property attributes. See the Remarks section for valid values. - eAttributeType[Visual Basic]
A CatalogAttributesEnum enumeration that specifies whether to return catalog or property attributes. See the Remarks section for valid values. - fUserDefinedOnly[C++]
[in, optional, defaultvalue (-1)] A VARIANT_BOOL that specifies whether to return only user-defined attributes. A value of True (-1) specifies returning only user-defined attributes. A value of False (0) specifies returning all attributes. - fUserDefinedOnly[Visual Basic]
A Boolean that specifies whether to return only user-defined attributes. A value of True specifies returning only user-defined attributes. A value of False specifies returning all attributes. The default value is True. - ppRSAttributes[C++]
[out, retval] A pointer to a _Recordset object that will be used to return the attributes.
Return Values
[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
[Visual Basic] If this method completes successfully, it returns a Recordset object that contains the attributes requested.
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++] 0x889800B [Visual Basic] &H8898005 |
The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method. |
E_CAT_INVALID_RS_POINTER | [C++] 0x889800B [Visual Basic] &H8898007 |
The recordset pointer that you specified is invalid |
E_CAT_INVALID_PARAMETER | [C++] 0x889800B [Visual Basic] &H8898006 |
The input parameter <parameter number> is invalid. |
Remarks
[C++] The ppRSAttributes parameter contains valid data only if the method completes successfully.
[Visual Basic] The Recordset object contains valid data only if the method completes successfully.
The following table shows the values in the CatalogAttributesEnum enumeration, their associated names, and describes their use.
Name | Value | Description |
---|---|---|
cscPropertyAttributes | 0 | Returns property attributes. |
cscCatalogAttributes | 1 | Returns catalog attributes. |
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
[Visual Basic]
Example
Set rsCatalogAttr = myCatalogManager.GetAttributes(cscCatalogAttributes, False)
See Also
[Visual Basic]CatalogManager Object
[C++]PropertyAttribute Recordset
[Visual Basic]PropertyAttribute Recordset
Copyright © 2005 Microsoft Corporation.
All rights reserved.