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

# VarBstrFromBool(3w)

## NAME

**VarBstrFromBool** (OLEAUT32.116)

## SYNOPSIS

HRESULT VarBstrFromBool\
  (\
   VARIANT\_BOOL *boolIn*,\
   LCID         *lcid*,\
   ULONG        *dwFlags*,\
   BSTR\*        *pbstrOut*\
  )

## DESCRIPTION

Convert a **VT\_BOOL** to a **VT\_BSTR**.

## PARAMS

*boolIn* **\[In\]**  Source.

*lcid* **\[In\]**  **LCID** for the conversion.

*dwFlags* **\[In\]**  Flags controlling the conversion (**VAR\_** flags from **"oleauto.h"**).

*pbstrOut* **\[Out\]**  Destination.

## RETURNS

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

**Failure:** **E\_INVALIDARG**, if *pbstrOut* is invalid. **E\_OUTOFMEMORY**, if memory allocation fails.

## NOTES

If *dwFlags* includes **VARIANT\_LOCALBOOL**, this function converts to the localised text of **"TRUE"** or **"FALSE"**. To convert a boolean into a numeric string of **"0"** or **"-1"**, use **VariantChangeTypeTypeEx(3w)**.

## IMPLEMENTATION

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

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

Debug channel **"variant"**.
