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

# VarAbs(3w)

## NAME

**VarAbs** (OLEAUT32.168)

## SYNOPSIS

HRESULT VarAbs\
  (\
   LPVARIANT *pVarIn*,\
   LPVARIANT *pVarOut*\
  )

## DESCRIPTION

Convert a variant to its absolute value.

## PARAMS

*pVarIn* **\[In\]**  Source variant.

*pVarOut* **\[Out\]**  Destination for converted value.

## RETURNS

**Success:** **S\_OK**. *pVarOut* contains the absolute value of *pVarIn*.

**Failure:** An **HRESULT** error code indicating the error.

## NOTES

**-** This function does not process by-reference variants.

**-** The type of the value stored in *pVarOut* depends on the type of *pVarIn*, according to the following table: \
\
  Input Type       Output Type\
\
  \----------       -----------\
\
  VT\_BOOL          VT\_I2\
\
  VT\_BSTR          VT\_R8\
\
  (All others)     Unchanged

## IMPLEMENTATION

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

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

Debug channel **"variant"**.
