IProfileService2::GetProfileDefXML Method [C++]

Use this method to retrieve the XML definition of the named profile schema type.

Definition

[C++]

HRESULT IProfileService::GetProfileDefXML(BSTRbstrProfileName,
  VARIANT_BOOLbNamesOnly,
  BSTR*pbstrXML);

[Visual Basic]

Function GetProfileDefXML(bstrProfileName As StringbNamesOnlyAs Boolean,
) As String

Parameters

  • bstrProfileName [C++]
    [in] A BSTR that contains the name of the profile schema type.
  • bstrProfileName [Visual Basic]
    [in] A String that contains the name of the profile schema type.
  • bNamesOnly [C++]
    [in] A VARIANT_BOOL that determines whether the method returns the profile schema name or the profile schema definition. A value of FALSE indicates to return the profile definition. A value of TRUE indicates to return only the name of the profile schema.
  • bNamesOnly [Visual Basic]
    [in] A Boolean that determines whether the method returns the profile schema name or the profile schema definition. A value of FALSE indicates to return the profile definition. A value of TRUE indicates to return only the name of the profile schema.
  • pbstrXML[C++]
    [out, retval] A pointer to a BSTR that will contain the XML description.

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 String that contains the XML description.

Error Values

[C++] The Errors property stores the collection of errors encountered in the last Profiles resource operation. For more information, see IProfileService::get_Errors.

[Visual Basic] The Errors property stores the collection of errors encountered in the last Profiles resource operation. For more information, see ProfileService.Errors.

Remarks

If the bstrProfileName parameter is empty and the bNamesOnly parameter is False (0), the XML descriptions of all the schema types in the catalog are returned.

If the bstrProfileName parameter is empty and the bNamesOnly parameter is True (-1), the names of all the schema types in the catalog are returned.

For information about the XML definitions, see the Profile XML Structures topic.

Call the Initialize method before you use this ProfileService method.

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

[C++]

The pbstrXML parameter contains valid data only if the method completes successfully.

[Visual Basic]

Example

' sXML is a String
' oProfileService is a Commerce ProfileService object

sXML = oProfileService.GetProfileDefXML("UserObject", False)

See Also

[C++]ProfileService Object

[C++]Profile XML Structures

[Visual Basic]ProfileService Object

[Visual Basic]Profile XML Structures

Copyright © 2005 Microsoft Corporation.
All rights reserved.