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

# VarMul(3w)

## NAME

**VarMul** (OLEAUT32.156)

## SYNOPSIS

HRESULT VarMul\
  (\
   LPVARIANT *left*,\
   LPVARIANT *right*,\
   LPVARIANT *result*\
  )

## DESCRIPTION

Multiply two variants.

## PARAMS

*left* **\[In\]**  First variant.

*right* **\[In\]**  Second variant.

*result* **\[Out\]**  Result variant.

## RETURNS

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

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

## NOTES

Native VarMul up to and including WinXP doesn't like **I1**, **UI2**, **UI4**, **UI8**, **INT** and **UINT** as input variants. But it can multiply apples with oranges.

Native VarMul doesn't check for **NULL** in/out pointers and crashes. We do the same here.

## FIXME

Overflow checking for **R8** (double) overflow. Return **DISP\_E\_OVERFLOW** in that case.

## IMPLEMENTATION

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

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

Debug channel **"variant"**.
