Information
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 Structure

Most of the Microsoft Active Accessibility functions and the IAccessible properties and methods take a VARIANT structure as a parameter. Essentially, the VARIANT structure is a container for a large union that carries many types of data.

The value in the first member of the structure, vt, describes which of the union members is valid. Although the VARIANT structure supports many different data types, Microsoft Active Accessibility uses only the following types.

vt ValueCorresponding value member name
VT_I4lVal
VT_DISPATCHpdispVal
VT_BSTRbstrVal
VT_EMPTYnone

 

When you receive information in a VARIANT structure, check the vt member to find out which member contains valid data. Similarly, when you send information using a VARIANT structure, always set vt to reflect the union member that contains the information.

Before using the structure, initialize it by calling the VariantInit Component Object Model (COM) function. When finished with the structure, clear it before the memory that contains the VARIANT is freed by calling VariantClear.

 

 

Community Additions

Show:
© 2014 Microsoft