An existing COleVariant or VARIANT object to be copied into the new COleVariant object.
pSrc
A pointer to a VARIANT object that will be copied into the new COleVariant object.
lpszSrc
A null-terminated string to be copied into the new COleVariant object.
vtSrc
TheVARTYPE for the new COleVariant object.
strSrc
A CString object to be copied into the new COleVariant object.
nSrc, lSrc
A numerical value to be copied into the new COleVariant object.
vtSrc
TheVARTYPE for the new COleVariant object.
curSrc
A COleCurrency object to be copied into the new COleVariant object.
fltSrc, dblSrc
A numerical value to be copied into the new COleVariant object.
dateSrc
A COleDateTime object to be copied into the new COleVariant object.
arrSrc
A CByteArray object to be copied into the new COleVariant object.
lbSrc
A CLongBinary object to be copied into the new COleVariant object.
Remarks
All of these constructors create new COleVariant objects initialized to the specified value. A brief description of each of these constructors follows.
COleVariant( ) Creates an empty COleVariant object, VT_EMPTY.
COleVariant( varSrc ) Copies an existing VARIANT or COleVariant object. The variant type is retained.
COleVariant( pSrc ) Copies an existing VARIANT or COleVariant object. The variant type is retained.
COleVariant( lpszSrc ) Copies a string into the new object, VT_BSTR (UNICODE).
COleVariant( lpszSrc, vtSrc ) Copies a string into the new object. The parameter vtSrc must be VT_BSTR (UNICODE) or VT_BSTRT (ANSI).
COleVariant( strSrc ) Copies a string into the new object, VT_BSTR (UNICODE).
COleVariant( nSrc ) Copies an 8-bit integer into the new object, VT_UI1.
COleVariant( nSrc, vtSrc ) Copies a 16-bit integer (or Boolean value) into the new object. The parameter vtSrc must be VT_I2 or VT_BOOL.
COleVariant( lSrc, vtSrc ) Copies a 32-bit integer (or SCODE value) into the new object. The parameter vtSrc must be VT_I4, VT_ERROR, or VT_BOOL.
COleVariant( curSrc ) Copies a COleCurrency value into the new object, VT_CY.
COleVariant( fltSrc ) Copies a 32-bit floating-point value into the new object, VT_R4.
COleVariant( dblSrc ) Copies a 64-bit floating-point value into the new object, VT_R8.
COleVariant( dateSrc ) Copies a COleDateTime value into the new object, VT_DATE.
COleVariant( arrSrc ) Copies a CByteArray object into the new object, VT_EMPTY.
COleVariant( lbSrc ) Copies a CLongBinary object into the new object, VT_EMPTY.
For more information, see theVARIANT andVARTYPE entries in the Platform SDK.
For more information on SCODE, seeStructure of COM Error Codes in the Platform SDK.
COleVariant Overview | Class Members | Hierarchy Chart
See Also COleVariant::operator =, CString, COleCurrency, COleDateTime