VarBoolFromStr  (OLEAUT32.125)


 HRESULT VarBoolFromStr
  OLECHAR*      strIn,
  LCID          lcid,
  ULONG         dwFlags,


Convert a VT_BSTR to a VT_BOOL.


strIn [In] Source.
lcid [In] LCID for the conversion.
dwFlags [In] Flags controlling the conversion (VAR_ flags from "oleauto.h").
pBoolOut [Out] Destination.


Success: S_OK.

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


- 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.


Declared in "oleauto.h".

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

Debug channel "variant".

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