Difference between VARIANT_BOOL and SFTPAdvBool
In EFT, a check box can be selected (usually TRUE) or cleared (usually FALSE) in the user account, inherited from its Settings Template, or inherited from the Site. For this reason, the API needs the corresponding functions: VARIANT_BOOL and SFTPAdvBool.
When a script calls a function and wants to know the state (enabled/disabled) of that value, the result is either -1 (selected) or 0 (cleared). VARIANT_BOOL cannot return information about the inheritance of that value, only whether it is selected or cleared.
VARIANT_BOOL has only two possible values:
-
VARIANT_FALSE(0)
-
VARIANT_TRUE(-1)
However, a check box setting can be inherited (TRUE) and cleared (FALSE). For these functions, SFTPAdvBool is used instead of VARIANT_BOOL.
SFTPAdvBool has three possible values:
-
abFalse = 0
-
abTrue = 1
-
abInherited = -2
For example, to make the state inherited, (-2) should be called.
Another parameter, pInherited, is similar to VARIANT_BOOL, but declared as a VARIANT due to VB limitations. pInherited is -1(VARIANT_TRUE) when pVal was inherited from the upper level and 0(VARIANT_FALSE) when it is not inherited.