IDataFunctions::ConvertFloatString
The ConvertFloatString method converts a string representation of a number to a double VARIANT, based on the specified locale.
Syntax
HRESULT ConvertFloatString(
VARIANT vtNum,// in
VARIANT vtLocale,// in
VARIANT *pvarNumber// out
);
Parameters
- vtNum
- A VARIANT that contains the string representation of the number to convert. The vt member of this VARIANT must be initialized to VT_BSTR, and its pbstrVal member must contain the BSTR value to convert.
- vtLocale
- A VARIANT that specifies the locale on which to base the conversion. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), ConvertFloatString uses the locale specified by a previous call to put_Locale.
- pvarNumber
- If successful, a pointer to a VARIANT that contains the converted value. ConvertFloatString initializes this VARIANT's vt member to VT_R8, and stores the converted value in its dblVall member. If unsuccessful, ConvertFloatString sets pvarNumber to NULL.
Include
<commerce.h>
Return Values
Value |
Description |
S_OK |
The conversion was successful. |
DISP_E_TYPEMISMATCH |
The value in vtNum is not a BSTR value. |
Related Topic
IDataFunctions::ConvertNumberString
© 1997-2000 Microsoft Corporation. All rights reserved.