• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

COle Variant

What is a COle variant in MFC?Any explanation or even pointers to resources would be appreciated.
0
samroyc
Asked:
samroyc
1 Solution
 
rcarlanCommented:
From MSDN:

<<A COleVariant object encapsulates theVARIANT 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.>>


VARIANT is an OLE data type (basically a struct combined with a union) for representing different data types in a unified way. It enables the transfer of information across COM/OLE method calls more or less independent of hardware and programming language used. COleVariant simply wraps the COM/OLE VARIANT structure.

Radu
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now