_Catalogsets2::GetCatalogSetIDForUser Method [C++]
Use this method to return the catalog set ID for a specific user.
Definition
[C++]
HRESULT _Catalogsets2::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
[C++]
- objProfileService
[in] A pointer to the IDispatch interface to the ProfileService object. - user_id
[in] A BSTR that contains the user ID. - defaultCatalogSetID
[in] A BSTR that contains the default catalog set ID. - retVal
[out, retval] A pointer to a VARIANT used to return the catalog set ID.
[Visual Basic]
- objProfileService
A ProfileService object. - user_id
A String that contains the user ID. - defaultCatalogSetID
A String that contains the default 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 parameter retVal 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]
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 = myCatalogsets2.GetCatalogSetIDForUser(oProfileService, user_id, defaultCatalogSetID)
See Also
[C++]Catalogsets2 Object
[Visual Basic]Catalogsets2 Object
[Visual Basic]ProfileService Object
Copyright © 2005 Microsoft Corporation.
All rights reserved.