VarCat function

Concatenates two variants and returns the result.

Syntax


HRESULT VarCat(
  _In_   LPVARIANT pvarLeft,
  _In_   LPVARIANT pvarRight,
  _Out_  LPVARIANT pvarResult
);

Parameters

pvarLeft [in]

The first variant.

pvarRight [in]

The second variant.

pvarResult [out]

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.

ConditionResult
Both expressions are stringsConcatenated
Both expressions are nullNull
One expression is null and the other is not nullThe non-null type
Either expression is a Boolean FALSE equal to 1 or TRUE equal to -1
Either expression is VT_ERRORNull
Both expressions are numericConcatenated and returned as a string
One expression is numeric and the other a stringConcatenated
Either expression is a dateDate
Both expressions are emptyEmpty string

 

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft