VarAdd Function

Returns the sum of two variants.

HRESULT VarAdd(
    [in]  LPVARIANT  pvarLeft,
    [in]  LPVARIANT  pvarRight,
    [out] LPVARIANT  pvarResult
);
pvarLeft

[in] A pointer to the first variant.

pvarRight

[in] A pointer to the second variant.

pvarResult

[out] A pointer to the result variant.

The function returns one of the following:

If

Then

Both expressions are of the string type

Concatenated.

One expression is a string type and the other a character

Addition.

One expression is numeric and the other is a string

Addition.

Both expressions are numeric

Addition.

Either expression is NULL

NULL is returned.

Both expressions are empty

Integer subtype is returned.

Show:
© 2014 Microsoft. All rights reserved.