UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:winnls.GetCurrencyFormatEx |
GetCurrencyFormatEx function (winnls.h) |
Formats a number string as a currency string for a locale specified by name.Note The application should call this function in preference to GetCurrencyFormat if designed to run only on Windows Vista and later. Note This function can format data that changes between releases, for example, due to a custom locale. If your application must persist or transmit data, see Using Persistent Locale Data. |
|
intl\getcurrencyformatex.htm |
Intl |
72639b31-cd5d-455c-873a-e3cf4051f4cd |
12/05/2018 |
GetCurrencyFormatEx, GetCurrencyFormatEx function [Internationalization for Windows Applications], _win32_GetCurrencyFormatEx, intl.getcurrencyformatex, winnls/GetCurrencyFormatEx |
winnls.h |
Windows.h |
Windows |
Windows 2000 Professional [desktop apps \| UWP apps] |
Windows 2000 Server [desktop apps \| UWP apps] |
Kernel32.lib |
Kernel32.dll |
Windows |
19H1 |
|
|
|
|
|
|
Formats a number string as a currency string for a locale specified by name.
Pointer to a locale name or one of the following predefined values.
Flags controlling the operation of the function. The application must set this parameter to 0 if lpFormat is not set to NULL. In this case, the function formats the string using user overrides to the default currency format for the locale. If lpFormat is set to NULL, the application can specify LOCALE_NOUSEROVERRIDE to format the string using the system default currency format for the specified locale.
Pointer to a null-terminated string containing the number string to format. This string can contain only the following characters. All other characters are invalid. The function returns an error if the string deviates from these rules.
- Characters "0" through "9"
- One decimal point (dot) if the number is a floating-point value
- A minus sign in the first character position if the number is a negative value
Pointer to a CURRENCYFMT structure that contains currency formatting information. All members of the structure must contain appropriate values. The application can set this parameter to NULL if function is to use the currency format of the specified locale. If this parameter is not set to NULL, the function uses the specified locale only for formatting information not specified in the CURRENCYFMT structure, for example, the string value for the negative sign used by the locale.
Pointer to a buffer in which this function retrieves the formatted currency string.
Size, in characters, of the lpCurrencyStr buffer. The application can set this parameter to 0 to return the size of the buffer required to hold the formatted currency string. In this case, the buffer indicated by lpCurrencyStr is not used.
Returns the number of characters retrieved in the buffer indicated by lpCurrencyStr if successful. If the cchCurrency parameter is 0, the function returns the size of the buffer required to hold the formatted currency string, including a terminating null character.
The function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
- ERROR_INSUFFICIENT_BUFFER. A supplied buffer size was not large enough, or it was incorrectly set to NULL.
- ERROR_INVALID_FLAGS. The values supplied for flags were not valid.
- ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.
Beginning in Windows 8: If your app passes language tags to this function from the Windows.Globalization namespace, it must first convert the tags by calling ResolveLocaleName.