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

# VarXor(3w)

## NAME

**VarXor** (OLEAUT32.167)

## SYNOPSIS

HRESULT VarXor\
  (\
   LPVARIANT *pVarLeft*,\
   LPVARIANT *pVarRight*,\
   LPVARIANT *pVarOut*\
  )

## DESCRIPTION

Perform a logical exclusive-or (**XOR**) operation on two variants.

## PARAMS

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

*pVarRight* **\[In\]**  Variant to **XOR** with *pVarLeft*.

*pVarOut* **\[Out\]**  Destination for **XOR** result.

## RETURNS

**Success:** **S\_OK**. *pVarOut* contains the result of the operation with its type taken from the table below).

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

## NOTES

**-** Neither *pVarLeft* or *pVarRight* are modified by this function.

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

**-** Input types of **VT\_BSTR** may be numeric strings or boolean text.

**-** The type of result stored in *pVarOut* depends on the types of *pVarLeft* and *pVarRight*, and will be one of **VT\_UI1**, **VT\_I2**, **VT\_I4**, **VT\_I8**, **VT\_BOOL**, or **VT\_NULL** if the function succeeds.

**-** Type promotion is inconsistent and as a result certain combinations of values will return **DISP\_E\_OVERFLOW** even when they could be represented. This matches the behaviour of native oleaut32.

## IMPLEMENTATION

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

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

Debug channel **"variant"**.
