description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|
Learn more about: _variant_t::_variant_t |
_variant_t::_variant_t |
11/04/2016 |
|
|
a50e5b33-d4c6-4a26-8e7e-a0a25fd9895b |
Microsoft Specific
Constructs a _variant_t
object.
_variant_t( ) throw( );
_variant_t(
const VARIANT& varSrc
);
_variant_t(
const VARIANT* pVarSrc
);
_variant_t(
const _variant_t& var_t_Src
);
_variant_t(
VARIANT& varSrc,
bool fCopy
);
_variant_t(
short sSrc,
VARTYPE vtSrc = VT_I2
);
_variant_t(
long lSrc,
VARTYPE vtSrc = VT_I4
);
_variant_t(
float fltSrc
) throw( );
_variant_t(
double dblSrc,
VARTYPE vtSrc = VT_R8
);
_variant_t(
const CY& cySrc
) throw( );
_variant_t(
const _bstr_t& bstrSrc
);
_variant_t(
const wchar_t *wstrSrc
);
_variant_t(
const char* strSrc
);
_variant_t(
IDispatch* pDispSrc,
bool fAddRef = true
) throw( );
_variant_t(
bool bSrc
) throw( );
_variant_t(
IUnknown* pIUknownSrc,
bool fAddRef = true
) throw( );
_variant_t(
const DECIMAL& decSrc
) throw( );
_variant_t(
BYTE bSrc
) throw( );
variant_t(
char cSrc
) throw();
_variant_t(
unsigned short usSrc
) throw();
_variant_t(
unsigned long ulSrc
) throw();
_variant_t(
int iSrc
) throw();
_variant_t(
unsigned int uiSrc
) throw();
_variant_t(
__int64 i8Src
) throw();
_variant_t(
unsigned __int64 ui8Src
) throw();
varSrc
A VARIANT
object to be copied into the new _variant_t
object.
pVarSrc
Pointer to a VARIANT
object to be copied into the new _variant_t
object.
var_t_Src
A _variant_t
object to be copied into the new _variant_t
object.
fCopy
If false
, the supplied VARIANT
object is attached to the new _variant_t
object without making a new copy by VariantCopy
.
ISrc
, sSrc
An integer value to be copied into the new _variant_t
object.
vtSrc
The VARTYPE
for the new _variant_t
object.
fltSrc
, dblSrc
A numerical value to be copied into the new _variant_t
object.
cySrc
A CY
object to be copied into the new _variant_t
object.
bstrSrc
A _bstr_t
object to be copied into the new _variant_t
object.
strSrc
, wstrSrc
A string to be copied into the new _variant_t
object.
bSrc
A bool
value to be copied into the new _variant_t
object.
pIUknownSrc
COM interface pointer to a VT_UNKNOWN object to be encapsulated into the new _variant_t
object.
pDispSrc
COM interface pointer to a VT_DISPATCH object to be encapsulated into the new _variant_t
object.
decSrc
A DECIMAL
value to be copied into the new _variant_t
object.
bSrc
A BYTE
value to be copied into the new _variant_t
object.
cSrc
A char
value to be copied into the new _variant_t
object.
usSrc
A unsigned short
value to be copied into the new _variant_t
object.
ulSrc
A unsigned long
value to be copied into the new _variant_t
object.
iSrc
An int
value to be copied into the new _variant_t
object.
uiSrc
An unsigned int
value to be copied into the new _variant_t
object.
i8Src
An __int64
value to be copied into the new _variant_t
object.
ui8Src
An unsigned __int64
value to be copied into the new _variant_t
object.
-
_variant_t()
Constructs an empty_variant_t
object,VT_EMPTY
. -
_variant_t( VARIANT& varSrc )
Constructs a_variant_t
object from a copy of theVARIANT
object. The variant type is retained. -
_variant_t( VARIANT* pVarSrc )
Constructs a_variant_t
object from a copy of theVARIANT
object. The variant type is retained. -
_variant_t( _variant_t& var_t_Src )
Constructs a_variant_t
object from another_variant_t
object. The variant type is retained. -
_variant_t( VARIANT& varSrc, bool fCopy )
Constructs a_variant_t
object from an existingVARIANT
object. IffCopy
isfalse
, theVARIANT
object is attached to the new object without making a copy. -
_variant_t( short sSrc, VARTYPE vtSrc = VT_I2 )
Constructs a_variant_t
object of typeVT_I2
orVT_BOOL
from ashort
integer value. Any otherVARTYPE
results in anE_INVALIDARG
error. -
_variant_t( long lSrc, VARTYPE vtSrc = VT_I4 )
Constructs a_variant_t
object of typeVT_I4
,VT_BOOL
, orVT_ERROR
from along
integer value. Any otherVARTYPE
results in anE_INVALIDARG
error. -
_variant_t( float fltSrc )
Constructs a_variant_t
object of typeVT_R4
from afloat
numerical value. -
_variant_t( double dblSrc, VARTYPE vtSrc = VT_R8 )
Constructs a_variant_t
object of typeVT_R8
orVT_DATE
from adouble
numerical value. Any otherVARTYPE
results in anE_INVALIDARG
error. -
_variant_t( CY& cySrc )
Constructs a_variant_t
object of typeVT_CY
from aCY
object. -
*_variant_t( _bstr_t& bstrSrc )
* Constructs a_variant_t
object of typeVT_BSTR
from a_bstr_t
object. A newBSTR
is allocated. -
_variant_t( wchar_t* wstrSrc )
Constructs a_variant_t
object of typeVT_BSTR
from a Unicode string. A newBSTR
is allocated. -
_variant_t( char* strSrc )
Constructs a_variant_t
object of typeVT_BSTR
from a string. A newBSTR
is allocated. -
_variant_t( bool bSrc )
Constructs a_variant_t
object of typeVT_BOOL
from abool
value. -
_variant_t( IUnknown* pIUknownSrc, bool fAddRef = true )
Constructs a_variant_t
object of typeVT_UNKNOWN
from a COM interface pointer. IffAddRef
istrue
, thenAddRef
is called on the supplied interface pointer to match the call toRelease
that will occur when the_variant_t
object is destroyed. It is up to you to callRelease
on the supplied interface pointer. IffAddRef
isfalse
, this constructor takes ownership of the supplied interface pointer; don't callRelease
on the supplied interface pointer. -
_variant_t( IDispatch* pDispSrc, bool fAddRef = true )
Constructs a_variant_t
object of typeVT_DISPATCH
from a COM interface pointer. IffAddRef
istrue
, thenAddRef
is called on the supplied interface pointer to match the call toRelease
that will occur when the_variant_t
object is destroyed. It's up to you to callRelease
on the supplied interface pointer. IffAddRef
isfalse
, this constructor takes ownership of the supplied interface pointer; don't callRelease
on the supplied interface pointer. -
_variant_t( DECIMAL& decSrc )
Constructs a_variant_t
object of typeVT_DECIMAL
from aDECIMAL
value. -
_variant_t( BYTE bSrc )
Constructs a_variant_t
object of typeVT_UI1
from aBYTE
value.
END Microsoft Specific