VarBoolFromStr(3w)

VarBoolFromStr3w

Usage

HRESULT VarBoolFromStr
(
OLECHAR* strIn,
LCID lcid,
ULONG dwFlags,
VARIANT_BOOL* pBoolOut
)

Overview

Convert a VT_BSTR to a VT_BOOL.

Params

strIn [In] Source.

lcid [In] LCID for the conversion.

dwFlags [In] Flags controlling the conversion (VAR_ flags from "oleauto.h").

pBoolOut [Out] Destination.

Returns

Success: S_OK.

Failure: E_INVALIDARG, if pBoolOut is invalid. DISP_E_TYPEMISMATCH, if the type cannot be converted.

Notes

- strIn will be recognised if it contains "#TRUE#" or "#FALSE#". Additionally, it may contain (in any case mapping) the text "TRUE" or "FALSE".

- If dwFlags includes VAR_LOCALBOOL, then the text may also match the localised text of "TRUE" or "FALSE" in the language specified by lcid.

- If none of these matches occur, the string is treated as a numeric string and the boolean pBoolOut will be set according to whether the number is zero or not. The dwFlags parameter is passed to VarR8FromStr(3w) for this conversion.

- If the text is not numeric and does not match any of the above, then DISP_E_TYPEMISMATCH is returned.

Implementation

Declared in "oleauto.h".

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

Debug channel "variant".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.