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

# VarUI8FromDec(3w)

## NAME

**VarUI8FromDec** (OLEAUT32.441)

## SYNOPSIS

HRESULT VarUI8FromDec\
  (\
   DECIMAL\* *pdecIn*,\
   ULONG64\* *pui64Out*\
  )

## DESCRIPTION

Convert a **VT\_DECIMAL** to a **VT\_UI8**.

## PARAMS

pDecIn **\[In\]**  Source.

*pui64Out* **\[Out\]**  Destination.

## RETURNS

**Success:** **S\_OK**.

**Failure:** **E\_INVALIDARG**, if the source value is invalid **DISP\_E\_OVERFLOW**, if the value will not fit in the destination.

## NOTES

Under native Win32, if the source value has a scale of **0**, its sign is ignored, i.e. this function takes the absolute value rather than fail with **DISP\_E\_OVERFLOW**. This bug has been fixed in Wine's implementation (use **[VarAbs(3w)](/VarAbs/3w.md)** on pDecIn first if you really want this behaviour).

## IMPLEMENTATION

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

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

Debug channel **"variant"**.
