_variant_t::_variant_t
Microsoft Specific
_variant_t( ) throw( );
_variant_t( const VARIANT& varSrc ) throw( _com_error );
_variant_t( const VARIANT* pVarSrc ) throw( _com_error );
_variant_t( const _variant_t& var_t_Src ) throw( _com_error );
_variant_t( VARIANT& varSrc, bool fCopy ) throw( _com_error );
_variant_t( short sSrc, VARTYPE vtSrc = VT_I2 ) throw( _com_error );
_variant_t( long lSrc, VARTYPE vtSrc = VT_I4 ) throw( _com_error );
_variant_t( float fltSrc ) throw( );
_variant_t( double dblSrc, VARTYPE vtSrc = VT_R8 ) throw( _com_error );
_variant_t( const CY& cySrc ) throw( );
_variant_t( const _bstr_t& bstrSrc ) throw( _com_error );
_variant_t( const wchar_t *wstrSrc ) throw( _com_error );
_variant_t( const char* strSrc ) throw( _com_error );
_variant_t( bool bSrc ) throw( );
_variant_t( IUnknown* pIUknownSrc, bool fAddRef = true ) throw( );
_variant_t( IDispatch* pDispSrc, bool fAddRef = true ) throw( );
_variant_t( const DECIMAL& decSrc ) throw( );
_variant_t( BYTE bSrc ) throw( );
Parameters
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
Remarks
Constructs a _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 the VARIANT object. The variant type is retained.
-
_variant_t( VARIANT* pVarSrc ) Constructs a _variant_t object from a copy of the VARIANT 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 existing VARIANT object. If fCopy is false, the VARIANT 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 type VT_I2 or VT_BOOL from a short integer value. Any other VARTYPE results in an E_INVALIDARG error.
-
_variant_t( long lSrc, VARTYPE vtSrc = VT_I4 ) Constructs a _variant_t object of type VT_I4, VT_BOOL, or VT_ERROR from a long integer value. Any other VARTYPE results in an E_INVALIDARG error.
-
_variant_t( float fltSrc ) Constructs a _variant_t object of type VT_R4 from a float numerical value.
-
_variant_t( double dblSrc, VARTYPE vtSrc = VT_R8 ) Constructs a _variant_t object of type VT_R8 or VT_DATE from a double numerical value. Any other VARTYPE results in an E_INVALIDARG error.
-
_variant_t( CY& cySrc ) Constructs a _variant_t object of type VT_CY from a CY object.
-
_variant_t( _bstr_t& bstrSrc ) Constructs a _variant_t object of type VT_BSTR from a _bstr_t object. A new BSTR is allocated.
-
_variant_t( wchar_t *wstrSrc ) Constructs a _variant_t object of type VT_BSTR from a Unicode string. A new BSTR is allocated.
-
_variant_t( char* strSrc ) Constructs a _variant_t object of type VT_BSTR from a string. A new BSTR is allocated.
-
_variant_t( bool bSrc ) Constructs a _variant_t object of type VT_BOOL from a bool value.
-
_variant_t( IUnknown* pIUknownSrc, bool fAddRef = true ) Constructs a _variant_t object of type VT_UNKNOWN from a COM interface pointer. If fAddRef is true, then AddRef is called on the supplied interface pointer to match the call to Release that will occur when the _variant_t object is destroyed. It is up to you to call Release on the supplied interface pointer. If fAddRef is false, this constructor takes ownership of the supplied interface pointer; do not call Release on the supplied interface pointer.
-
_variant_t( IDispatch* pDispSrc, bool fAddRef = true ) Constructs a _variant_t object of type VT_DISPATCH from a COM interface pointer. If fAddRef is true, then AddRef is called on the supplied interface pointer to match the call to Release that will occur when the _variant_t object is destroyed. It is up to you to call Release on the supplied interface pointer. If fAddRef is false, this constructor takes ownership of the supplied interface pointer; do not call Release on the supplied interface pointer.
-
_variant_t( DECIMAL& decSrc ) Constructs a _variant_t object of type VT_DECIMAL from a DECIMAL value.
-
_variant_t( BYTE bSrc ) Constructs a _variant_t object of type VT_UI1 from a BYTE value.
_variant_t Overview
END Microsoft Specific