Share via


IMigrationMainObj::Initialize Method [C++]

Use this method to set up all the components for the migration process.

[C++]

HRESULT IMigrationMainObj::Initialize(BSTRsProfileDirectory);

[Visual Basic]

Sub Initialize(sProfileDirectory As String)

Parameters

  • sProfileDirectory[C++]
    [in] A BSTR that contains the path of the profile directory. This parameter, indicating where all profile files reside, is parsed for each of the following values:
    • An array containing the attribute names for each profile ID. These arrays will be stored in a structure that will be passed to the MigrationReadObj, MigrationModifyObj, and MigrationWriteObj objects.
    • The connection string to the membership directory or SQL Server that will be passed to the MigrationReadObj and MigrationWriteObj objects in the form of an array of connection strings.
    • The profile ID for each profile so that the correct attribute array can be identified. The profile IDs will be passed to the MigrationReadObj and MigrationWriteObj objects in the form of an array of profile IDs. The profile ID is passed to the MigrationModifyObj object as a single ID.
    • The ProgID for each COM object so that it can be initialized with the above data. The ProgIDs will be stored in an array so that the correct objects can be called based on the profile ID.
  • sProfileDirectory[Visual Basic]
    A String that contains the path of the profile directory. This parameter, indicating where all profile files reside, is parsed for each of the following values:
    • An array containing the attribute names for each profile ID. These arrays will be stored in a structure that will be passed to the MigrationReadObj, MigrationModifyObj, and MigrationWriteObj objects.
    • The connection string to the membership directory or SQL Server that will be passed to the MigrationReadObj and MigrationWriteObj objects in the form of an array of connection strings.
    • The profile ID for each profile so that the correct attribute array can be identified. The profile IDs will be passed to the MigrationReadObj and MigrationWriteObj objects in the form of an array of profile IDs. The profile ID is passed to the MigrationModifyObj object as a single ID.
    • The ProgID for each COM object so that it can be initialized with the above data. The ProgIDs will be stored in an array so that the correct objects can be called based on the profile ID.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] None.

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

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

See Also

[C++]MigrationMainObj Object

[Visual Basic]MigrationMainObj Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.