IEuroDisplay::ConvertAltStringToCurr Method [C++]

Use this method to convert a string representation of a monetary value in the currency specified by the alternate locale identifier to a currency Variant.

Definition

[C++]

HRESULT IEuroDisplay::ConvertAltStringToCurr(VARIANTvtMoneyString,
  VARIANT*pvarNumber);

[Visual Basic]

Function ConvertAltStringToCurr(vtMoneyString As Variant) As Variant

Parameters

  • vtMoneyString[C++]
    [in] A VARIANT that contains the currency string to convert.
  • vtMoneyString[Visual Basic]
    A Variant that contains the currency string to convert.
  • pvarNumber[C++]
    [out, retval] A pointer to a currency VARIANT used to return the converted currency information.

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 currency Variant that contains the converted currency information.

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 pvarNumber parameter points to valid data only if the method returns successfully.

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

[Visual Basic]

Example

' oEuroDisp is a Commerce.EuroDisplay object
' vResult is a Variant
vResult = oEuroDisp.ConvertAltStringToCurr("23,444.53886")
' In the preceding example, the variable vResult is 
' internally rounded to 23444.5389

See Also

[C++]EuroDisplay Object

[C++]IEuroDisplay::ConvertBaseStringToCurr

[C++]IEuroDisplay::FormatAltMoney

[Visual Basic]EuroDisplay Object

[Visual Basic]EuroDisplay.ConvertBaseStringToCurr

[Visual Basic]EuroDisplay.FormatAltMoney

Copyright © 2005 Microsoft Corporation.
All rights reserved.