Export (0) Print
Expand All

COleVariant Class

class COleVariant : public tagVARIANT

Remarks

A COleVariant object encapsulates the VARIANT data type. This data type is used in OLE automation. Specifically, the DISPPARAMS structure contains a pointer to an array of VARIANT structures. A DISPPARAMS structure is used to pass parameters to IDispatch::Invoke.

Note   This class is derived from the VARIANT structure. This means you can pass a COleVariant in a parameter that calls for a VARIANT and that the data members of the VARIANT structure are accessible data members of COleVariant.

The two related MFC classes COleCurrency and COleDateTime encapsulate the variant data types CURRENCY (VT_CY) and DATE (VT_DATE). The COleVariant class is used extensively in the DAO classes; see these classes for typical usage of this class, for example CDaoQueryDef and CDaoRecordset.

For more information, see the VARIANT, CURRENCY, DISPPARAMS, and IDispatch::Invoke entries in the Platform SDK.

For more information on the COleVariant class and its use in OLE automation, see "Passing Parameters in OLE Automation" in the article Automation..

Requirements

Header: afxdisp.h

See Also

Class Members | Hierarchy Chart

Show:
© 2014 Microsoft