Previous in Contents Next in Contents

IDataFunctions::Float

The IDataFunctions::Float method converts a double to a string VARIANT, based on the specified locale.

Syntax

HRESULT Float(
double Number,// in
VARIANT vtLocale,// in
VARIANT *pvarRet// out
);

Parameters

Number
Specifies the number to format as a BSTR.
vtLocale
A VARIANT that specifies the locale to use to perform the conversion. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), Float uses the locale specified by a previous call to put_Locale.
pvarRet
If successful, a pointer to a VARIANT that contains the converted value. Float initializes this VARIANT's vt member to VT_BSTR, and stores the converted value in its pbstrVal member. If unsuccessful, Float sets pvarRet to NULL.

Include

<commerce.h>

Return Values

Value Description
S_OK This function always returns S_OK. If the conversion fails, Float returns an HRESULT indicating failure (for example, E_FAIL), and sets pvarRet evaluates to NULL.

Related Topic

IDataFunctions::ConvertFloatString, IDataFunctions::Number


© 1997-2000 Microsoft Corporation. All rights reserved.