Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSTextConvertor Interface Reference

List of all members.

Detailed Description

The IDSSTextConvertor interface exposes methods that, given a specific locale, can convert from numbers to strings and vice-versa.

The user has the ability to control the format of the output string by using a format string. Additionally, the interface allows the user to obtain a handle for a given format. This handle can then be used to convert numbers to strings. Using the format handle is more efficient then doing the conversion without it.


Public Member Functions

HRESULT DoubleToText ([in] double Number,[in, optional]BSTR Format,[in, defaultvalue(-1)] Int32 Locale,[out, optional] Int32 *pColor,[out, retval] BSTR *pText)
 Converts a double into a string.
HRESULT DoubleToTextH ([in] double Number,[in] Int32 Handle,[in, defaultvalue(-1)] Int32 Locale,[out, optional] Int32 *pColor,[out, retval] BSTR *pText)
 Converts a double into a string using a handle.
HRESULT GetFormatHandle ([in] BSTR Format,[in, defaultvalue(-1)] Int32 Locale,[out, retval] Int32 *pHandle)
 Obtains a handle for a particular number format.
HRESULT LongToText ([in] Int32 Number,[in, optional] BSTR Format,[in, defaultvalue(-1)] Int32 Locale,[out, optional] Int32 *pColor,[out, retval] BSTR *pText)
 Converts a long into a string.
HRESULT LongToTextH ([in] Int32 Number,[in] Int32 Handle,[in, defaultvalue(-1)] Int32 Locale,[out, optional] Int32 *pColor,[out, retval] BSTR *pText)
 Converts a long into a string using a handle.
HRESULT TextToDouble ([in] BSTR Text,[in, defaultvalue(-1)] Int32 Locale,[out, retval] double *pNumber)
 Converts a string into a double.
HRESULT TextToLong ([in] BSTR Text,[in, defaultvalue(-1)] Int32 Locale,[out, retval] Int32 *pNumber)
 Converts a string into a long.


Member Function Documentation

HRESULT IDSSTextConvertor::DoubleToText [in] double  Number,
[in, optional] BSTR  Format,
[in, defaultvalue(-1)] Int32  Locale,
[out, optional] Int32 *  pColor,
[out, retval] BSTR *  pText
 

Converts a double into a string.

This method converts a double value to a string.

For more information on the Format and pColor arguments, see the descriptions under the general description of the interface.
Parameters:
Number The number to be formatted.
Format A format string describing how to format Number.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pColor A number which represents the color of the string.
pText Number as a string.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSTextConvertor::DoubleToTextH [in] double  Number,
[in] Int32  Handle,
[in, defaultvalue(-1)] Int32  Locale,
[out, optional] Int32 *  pColor,
[out, retval] BSTR *  pText
 

Converts a double into a string using a handle.

This method converts a double value to a string. Instead of using a format string, it uses a format handle. This handle needs to be obtained by a call to GetFormatHandle. Using this call is more efficient than DoubleToText.

For more information on the Format and pColor arguments, see the descriptions under the general description of the interface.
Parameters:
Number The number to be formatted.
Handle A format handle obtained by a call to GetFormatHandle.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pColor A number which represents the color of the string.
pText Number as a string.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSTextConvertor::GetFormatHandle [in] BSTR  Format,
[in, defaultvalue(-1)] Int32  Locale,
[out, retval] Int32 *  pHandle
 

Obtains a handle for a particular number format.

This method returns a format handle for a given Format/Locale pair. This handle can be used in calls to DoubleToTextH and LongToTextH.

For more information on the Format argument, see the descriptions under the general description of the interface.
Parameters:
Format A format string describing how to format Number.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pHandle A format handle for this Forma/ Locale pair.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSTextConvertor::LongToText [in] Int32  Number,
[in, optional] BSTR  Format,
[in, defaultvalue(-1)] Int32  Locale,
[out, optional] Int32 *  pColor,
[out, retval] BSTR *  pText
 

Converts a long into a string.

This method converts a long value to a string.

For more information on the Format and pColor arguments, see the descriptions under the general description of the interface.
Parameters:
Number The number to be formatted.
Format A format string describing how to format Number.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pColor A number which represents the color of the string.
pText Number as a string.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSTextConvertor::LongToTextH [in] Int32  Number,
[in] Int32  Handle,
[in, defaultvalue(-1)] Int32  Locale,
[out, optional] Int32 *  pColor,
[out, retval] BSTR *  pText
 

Converts a long into a string using a handle.

This method converts a long value to a string. Instead of using a format string, it uses a format handle. This handle needs to be obtained by a call to GetFormatHandle. Using this call is more efficient than LongToText.

For more information on the Format and pColor arguments, see the descriptions under the general description of the interface.
Parameters:
Number The number to be formatted.
Handle A format handle obtained by a call to GetFormatHandle.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pColor A number which represents the color of the string.
pText Number as a string.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSTextConvertor::TextToDouble [in] BSTR  Text,
[in, defaultvalue(-1)] Int32  Locale,
[out, retval] double *  pNumber
 

Converts a string into a double.

This method converts a string value to a double.

Parameters:
Text The string to be converted.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pNumber Text as a double.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSTextConvertor::TextToLong [in] BSTR  Text,
[in, defaultvalue(-1)] Int32  Locale,
[out, retval] Int32 *  pNumber
 

Converts a string into a long.

This method converts a string value to a long.

Parameters:
Text The string to be converted.
Locale A locale, specified as a Windows locale ID (LCID). Using -1 means to use the default locale for this machine.
pNumber Text as a double.
Returns:
Usual COM result code:
  • S_OK


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.