---
name: "GetCurrencyFormatA"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GetCurrencyFormatA"
---

# GetCurrencyFormatA(3w)

## NAME

**GetCurrencyFormatA** (KERNEL32.@)

## SYNOPSIS

INT GetCurrencyFormatA\
  (\
   LCID                *lcid*,\
   DWORD               *dwFlags*,\
   LPCSTR              *lpszValue*,\
   const CURRENCYFMTA\* *lpFormat*,\
   LPSTR               *lpCurrencyStr*,\
   int                 *cchOut*\
  )

## DESCRIPTION

Format a currency string for a given locale.

## PARAMS

*lcid* **\[In\]**  Locale to format for.

*dwFlags* **\[In\]**  **LOCALE\_** flags from **"winnls.h"**.

*lpszValue* **\[In\]**  String to format.

*lpFormat* **\[In\]**  Formatting overrides.

*lpCurrencyStr* **\[Out\]**  Destination for formatted string.

*cchOut* **\[In\]**  Size of *lpCurrencyStr*, or **0** to calculate the resulting size.

## NOTES

**-** *lpszValue* can contain only **'0'** **-** **'9'**, **'-'** and **'.'**.

**-** If *lpFormat* is non-NULL, *dwFlags* must be **0.** In this case *lpszValue* will be formatted according to the format details returned by **[GetLocaleInfoA(3w)](/GetLocaleInfoA/3w.md)**.

**-** This function rounds the currency if the number of decimals exceeds the locales number of currency decimal places.

**-** If *cchOut* is **0**, this function does not write to *lpCurrencyStr*.

**-** The Ascii version of this function fails if *lcid* is Unicode only.

## RETURNS

**Success:** The number of character written to lpNumberStr, or that would have been written, if *cchOut* is **0.**

**Failure:** **0.** Use **[GetLastError(3w)](/GetLastError/3w.md)** to determine the cause.

## IMPLEMENTATION

Declared in **"winnls.h"**.

Implemented in **"dlls/kernel32/lcformat.c"**.

Debug channel **"nls"**.
