ICatalogManager3::GetPropertyValues Method [C++]

Use this method to return the list of values defined for an enumeration property.

Definition

[C++]

HRESULT ICatalogManager3::GetPropertyValues(BSTRstrPropertyName,
  _Recordset**ppRSPropertyValues);

[Visual Basic]

Function GetPropertyValues(strPropertyName As String) As _Recordset

Parameters

  • strPropertyName[C++]
    [in] A BSTR that contains the name of the enumeration property for which the defined values will be returned.
  • strPropertyName[Visual Basic]
    A String that contains the name of the enumeration property for which the defined values will be returned.
  • ppRSPropertyValues[C++]
    [out, retval] A pointer to a _Recordset object used to return the property values.

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 defined values in the enumeration.

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.

Remarks

[C++] The ppRSPropertyValues parameter contains valid data only if the method completes successfully.

[Visual Basic] The returned recordset contains valid data only if the method completes successfully.

The following tables shows the fields in the returned recordset.

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_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 .,"[]

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

[Visual Basic]

Example

Set rsEnumValues = myCatalogManager.GetPropertyValues("Color")

See Also

[C++]CatalogManager Object

[Visual Basic]CatalogManager Object

[C++]ICatalogManager3::AddPropertyValue

[Visual Basic]CatalogManager.AddPropertyValue

[C++]ICatalogManager3::RemovePropertyValue

[Visual Basic]CatalogManager.RemovePropertyValue

Copyright © 2005 Microsoft Corporation.
All rights reserved.