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

# VarNot(3w)

## NAME

**VarNot** (OLEAUT32.174)

## SYNOPSIS

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

## DESCRIPTION

Perform a not operation on a variant.

## PARAMS

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

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

## RETURNS

**Success:** **S\_OK**. *pVarOut* contains the converted value.

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

## NOTES

**-** Strictly speaking, this function performs a bitwise ones complement on the variants value (after possibly converting to **VT\_I4**, see below). This only behaves like a boolean not operation if the value in *pVarIn* is either **VARIANT\_TRUE** or **VARIANT\_FALSE** and the type is signed.

**-** To perform a genuine not operation, convert the variant to a **VT\_BOOL** before calling this function.

**-** 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\_EMPTY         VT\_I2\
\
  VT\_R4            VT\_I4\
\
  VT\_R8            VT\_I4\
\
  VT\_BSTR          VT\_I4\
\
  VT\_DECIMAL       VT\_I4\
\
  VT\_CY            VT\_I4\
\
  (All others)     Unchanged

## IMPLEMENTATION

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

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

Debug channel **"variant"**.
