Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the sum of two variants.
Syntax
HRESULT VarAdd(
[in] LPVARIANT pvarLeft,
[in] LPVARIANT pvarRight,
[out] LPVARIANT pvarResult
);
Parameters
[in] pvarLeft
The first variant.
[in] pvarRight
The second variant.
[out] pvarResult
The result variant.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The function operates as follows.
Condition | Result |
---|---|
Both expressions are strings | Concatenated |
One expression is a string and the other a character | Addition |
One expression is numeric and the other a string | Addition |
Both expressions are numeric | Addition |
Either expression is null | Null |
Both expressions are empty | Integer |
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oleauto.h |
Library | OleAut32.lib |
DLL | OleAut32.dll |