get_currency_format


int get_currency_format(locale_identity Locale,
                      unsigned flags,
                      const character* Value,
                      const currency_format_flags* Format,
                      character* Currency,
                      int Length)

This function formats a currency string relative to a given locale's settings.

Parameters

locale_identity Locale

The locale identity. This identity may be formed via the function make_locale or it may be one of the predefined locales locale_system_default or locale_user_default.

If the parameter Format is null, the locale is used to determine the format of the output string; otherwise, the locale is used only to determine information not specified in the format string.

unsigned flags

The flag locale_types::use_no_override may be specified for this parameter, in which case, the system ANSI code page settings are utilized without making use of any locale overrides. This value may be used only if the parameter Format is non-null.

const character* Value

A pointer to a string containing the currency amount to be formatted. The string can contain:

If any other characters are presented, an error results.

const currency_format_flags* Format

A pointer to a structure that controls the formatting of currency amounts. If this parameter is null, the specified locale's currency formatting flags are used.

character* Currency

A pointer to a buffer that is updated to hold the required currency string.

int Length

The size (in characters) of the buffer pointed to by the previous parameter. If zero is specified, the required buffer length is returned and the previous parameter is ignored.

Return

int

If the parameter Length is set to zero, the value returned is the number of characters required for the string to fit the buffer. If Length is non-zero, the value returned is the number of characters transferred to the buffer.

If the function fails, zero is returned.