Share via


IProfileService2::GetProfileDefXML Method

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

HRESULT IProfileService::GetProfileDefXML(
  BSTR bstrProfileName,
  VARIANT_BOOL bNamesOnly,
  BSTR* pbstrXML
);
Function GetProfileDefXML(
    bstrProfileName As String,
    bNamesOnly As Boolean,
) As String

Parameters

  • bstrProfileName
    [C++]

    [in] A BSTR that contains the name of the profile schema type.

    [Visual Basic]

    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.

    [Visual Basic]

    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 Value

[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

The Errors property stores the collection of errors encountered in the last Profiles resource operation. For more information, see IProfileService::get_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.

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

Example

' sXML is a String.
' oProfileService is a Server ProfileService object.

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

See Also

Other Resources

ProfileService Object