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

# VarParseNumFromStr(3w)

## NAME

**VarParseNumFromStr** (OLEAUT32.46)

## SYNOPSIS

HRESULT VarParseNumFromStr\
  (\
   OLECHAR\*  *lpszStr*,\
   LCID      *lcid*,\
   ULONG     *dwFlags*,\
   NUMPARSE\* *pNumprs*,\
   BYTE\*     *rgbDig*\
  )

## DESCRIPTION

Parse a string containing a number into a **NUMPARSE** structure.

## PARAMS

*lpszStr* **\[In\]**  String to parse number from.

*lcid* **\[In\]**  Locale Id for the conversion.

*dwFlags* **\[In\]**  **0**, or **LOCALE\_NOUSEROVERRIDE** to use system default number chars.

*pNumprs* **\[In/Out\]**  Destination for parsed number.

*rgbDig* **\[Out\]**  Destination for digits read in.

## RETURNS

**Success:** **S\_OK**. *pNumprs* and *rgbDig* contain the parsed representation of the number.

**Failure:** **E\_INVALIDARG**, if any parameter is invalid. **DISP\_E\_TYPEMISMATCH**, if the string is not a number or is formatted incorrectly. **DISP\_E\_OVERFLOW**, if *rgbDig* is too small to hold the number.

## NOTES

*pNumprs* must have the following fields set:

**cDig:** Set to the size of *rgbDig*.

**dwInFlags:** Set to the allowable syntax of the number using **NUMPRS\_** flags from **"oleauto.h"**.

## FIXME

**-** I am unsure if this function should parse non-Arabic (e.g. Thai) numerals, so this has not been implemented.

## IMPLEMENTATION

Declared in **"oleauto.h"**.

Implemented in **"dlls/oleaut32/variant.c"**.

Debug channel **"variant"**.
