_CatalogSets::GetCatalogSetIDForUser Method [C++]

Use this method to return the catalog set ID for a specific user.

Definition

[C++]

HRESULT _CatalogSets::GetCatalogSetIDForUser(IDispatch*objProfileService,
  BSTRuser_id,
  BSTRdefaultCatalogSetID,
  VARIANT*retVal);

[Visual Basic]

Function GetCatalogSetIDForUser(objProfileService As IDispatch,
  user_id As String,
  defaultCatalogSetID As String) As Variant

Parameters

  • objProfileService[C++]
    [in] A pointer to the IDispatch interface to the ProfileService object.
  • objProfileService[Visual Basic]
    A ProfileService object.
  • user_id[C++]
    [in] A BSTR that contains the user ID.
  • user_id[Visual Basic]
    A String that contains the user ID.
  • defaultCatalogSetID[C++]
    [in] A BSTR that contains the default catalog set ID.
  • defaultCatalogSetID[Visual Basic]
    A String that contains the default catalog set ID.
  • retVal[C++]
    [out, retval] A pointer to a VARIANT used to return the catalog set ID.

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 Variant that contains the catalog set ID.

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 retVal parameter contains valid data only if the method completes successfully.

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

If the user defined in the objProfileService parameter has a catalog set associated with it, this method returns that ID; if not, it returns the catalog set associated with the user organization. If this catalog set does not exist, it returns the value supplied in the defaultCatalogSetID parameter.

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

[Visual Basic]

Example

strCatalogSetID = myCatalogSets.GetCatalogSetIDForUser(oProfileService, user_id, defaultCatalogSetID)

See Also

[C++]CatalogSets Object

[C++]ProfileService Object

[Visual Basic]CatalogSets Object

[Visual Basic]ProfileService Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.