VarCat Function

Concatenates two variants and returns the result.

HRESULT VarCat(
    [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.

Both expressions are NULL

NULL is returned.

One expression is NULL and the other is anything but NULL

The type of the other is returned.

Either expression is of type bool

FALSE equal to 0 or TRUE equal to -1 is returned.

Either expression is VT_ERROR

NULL is returned.

Both expressions are numeric

Concatenated and a string is returned.

One expression is numeric and the other is a string

Concatenated.

Either expression is of type date

The date format is returned.

Both expressions are empty

Empty string is returned.

Show:
© 2014 Microsoft