The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

_variant_t Class


The latest version of this topic can be found at _variant_t Class.

Microsoft Specific**

A _variant_t object encapsulates the VARIANT data type. The class manages resource allocation and deallocation and makes function calls to VariantInit and VariantClear as appropriate.


_variant_tConstructs a _variant_t object.


AttachAttaches a VARIANT object into the _variant_t object.
ClearClears the encapsulated VARIANT object.
ChangeTypeChanges the type of the _variant_t object to the indicated VARTYPE.
DetachDetaches the encapsulated VARIANT object from this _variant_t object.
SetStringAssigns a string to this _variant_t object.


Operator =Assigns a new value to an existing _variant_t object.
operator ==, !=Compare two _variant_t objects for equality or inequality.
ExtractorsExtract data from the encapsulated VARIANT object.

Header: comutil.h

Lib: comsuppw.lib or comsuppwd.lib (see /Zc:wchar_t (wchar_t Is Native Type) for more information)

Compiler COM Support Classes