Share via


IMigrationModify::ModifyAttributes Method [C++]

Use this method to input the key, profile ID, and array of values to be modified.

Definition

[C++]

HRESULT IMigrationModify::ModifyAttributes(longlProfile_id,
  BSTRbstrAttribute,
  USHORTtargetType,
  USHORTsourceType,
  VARIANT*varTarg);

[Visual Basic]

Sub ModifyAttributes(lProfile_id As Long,
  bstrAttribute As String,
  targetType As USHORT,
  sourceType As USHORT,
  varTarg As Variant)

Parameters

  • lProfile_id[C++]
    [in] A long that contains the ID of the profile XML file that is being used.
  • lProfile_id[Visual Basic]
    A Long that contains the ID of the profile XML file that is being used.
  • bstrAttribute[C++]
    [in] A BSTR that contains the name of the attribute that will be modified.
  • bstrAttribute[Visual Basic]
    A String that contains the name of the attribute that will be modified.
  • targetType[C++]
    [in] A USHORT that contains the data type that the attribute should be changed to.
  • targetType[Visual Basic]
    A USHORT that contains the data type that the attribute should be changed to.
  • sourceType[C++]
    [in] A USHORT that contains the data type of the attribute passed in.
  • sourceType[Visual Basic]
    A USHORT that contains the data type of the attribute passed in.
  • varTarg[C++]
    [in, out] A pointer to the VARIANT that contains the value of the attribute that will be changed. The value passed in is also used to return the altered value.
  • varTarg[Visual Basic]
    A Variant that contains the value of the attribute that will be changed. The passed in value passed in is also used to return the altered value.

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

This method uses the profile ID to determine the structure of the array based on the attributes that it read in the Initialize method.

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

See Also

[C++]MigrationModify Object

[Visual Basic]MigrationModify Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.