NAME

VarBoolFromStr  (OLEAUT32.125)

SYNOPSIS

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

DESCRIPTION

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 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 "include/oleauto.h". gitlab.winehq.org/wine/wine/blob/master/include/oleauto.h

Implemented in "dlls/oleaut32/vartype.c". gitlab.winehq.org/wine/wine/blob/master/dlls/oleaut32/vartype.c

Debug channel "variant".


Copyright © 2024 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Dec 2024.