class CVarDesc
The CVarDesc class encapsulates a VARDESC structure, which is used to add a property variable to an interface. See the Automation Programmer's Reference in the Platform Software Development Kit (SDK) for information on the VARDESC structure.
#include <addyn.h>
| Method | Description |
| CVarDesc | Constructor. |
| AddUserDefinedData (ICreateTypeInfo *ctiDestInterface); | Adds user-defined data to the type information currently under construction. |
| Attach (int iIndex, ITypeInfo *psrcTypeInfo); | Attaches the CVarDesc class to a VARDESC structure. |
| GetArrayData (ARRAYDESC **ppArrayDesc); | Returns the array descriptor for the CVarDesc object. The descriptor points to a safe array whose lifetime exceeds that of the CVarDesc object. Valid only when type is VT_ARRAY. |
| GetIDLDesc (IDLDESC *pIDLDesc); | Returns the IDLDESC structure for the object. |
| GetName (BSTR *pbstrElemName) | Returns the name of the variable. |
| GetMemId (MEMBERID *pMemid) | Returns the member ID for the variable. |
| GetOInst (unsigned long *pulOInst); | Returns the fixed offset for a variable that is a field or member of another variable. Valid only when VARKIND is VAR_PERINSTANCE. |
| GetParamDesc (PARAMDESC *pParamDesc) | Returns the number of parameters for the method. |
| GetType (VARTYPE *pvt) | Returns the type of the variable. |
| GetUserDefinedData (ITypeInfo **pptiSrc); | Returns a pointer to the ITypeInfo object for the user-defined data. The pointer is valid only within the source type information supplied with the constructor or with the Attach method. Valid only when type is VT_USERDEFINED. |
| GetVarFlags (MEMBERID *pMemid) | Returns the flags for the variable. |
| GetVarKind (VARKIND *pVarkind) | Returns the VARKIND enumerator for the variable. |
| GetVarValue (VARIANT *pvarValue) | Returns the value of the variable. Valid only when VARKIND is VAR_CONST. |
| SetArrayData (ARRAYDESC *pArrayDesc); | Sets the array descriptor for the CVarDesc object. The descriptor must point to a safe array whose lifetime exceeds that of the CVarDesc object. Valid only when type is VT_ARRAY. |
| SetIDLDesc (IDLDESC IDLDesc); | Returns the IDLDESC structure for the object. |
| SetMemId (MEMBERID Memid) | Sets the member ID for the variable. |
| SetName (BSTR bstrName); | Sets the name of the variable. |
| SetOInst (unsigned long ulOInst); | Sets the fixed offset for the variable, if it is a field or member of another variable. Valid only when VARKIND is VAR_PERINSTANCE. |
| SetParamDesc (PARAMDESC ParamDesc) | Sets the number of parameters for the method. |
| SetType (VARTYPE vt, int iIndirectionCt) | Sets the type of the variable. |
| SetUserDefinedData (ITypeInfo *ptiSrc); | Sets user-defined data. Call this method after calling SetType with the VARTYPE VT_USERDEFINED. |
| SetVarFlags (MEMBERID Memid) | Sets the flags for the variable. |
| SetVarKind (VARKIND Varkind) | Sets the VARKIND enumerator for the variable. |
| SetVarValue (VARIANT varValue) | Sets the value of the variable. Valid only when VARKIND is VAR_CONST. |
| Operator | Description |
| operator VARDESC | Extracts the VARDESC structure from the CVarDesc object. |
See Also