CElemDesc

class CElemDesc

The CElemDesc class encapsulates a ELEMDESC structure.

ELEMDESC structures are part of FUNCDESC and VARDESC structures; they provide data on method parameters, method return types, and property types. See the Automation Programmer's Reference in the Platform Software Development Kit (SDK) for additional information.

#include <addyn.h>

Class Members

Method Description
CElemDesc Constructor.
AddUserDefinedData (ICreateTypeInfo *pctiDestInterface) Adds user-defined data to the type information currently under construction.
Attach (ELEMDESC *pElemDesc, ITypeInfo *ptiSrc) Attaches the CElemDesc object to an ELEMDESC structure. The ITypeInfo pointer is required only if the type of the ELEMDESC structure is VT_USERDEFINED.
Detach () Detaches the CElemDesc object from the ELEMDESC structure.
GetArrayData (ARRAYDESC **pArrayDesc) Returns an array descriptor for data of type VT_ARRAY. The array descriptor should point to a safe array that has a lifetime exceeding that of the CElemDesc object. If the type of CElemDesc is not VT_ARRAY, this method returns S_FALSE.
GetIDLDesc (IDLDESC *pIdlDesc) Returns data in the IDLDESC structure.
GetName (BSTR *pbstrName) Returns the name of an element.
CElemDesc *GetNext (); Returns a pointer to the next CElemDesc object in a list.
GetParamdesc (PARAMDESC *pParamDesc) Returns data in the PARAMDESC structure.
GetType (VARTYPE * pvt) Returns the type of the CElemDesc object.
GetUserDefinedData (ITypeInfo **pptiSrc) Returns an ITypeInfo pointer to data of type VT_USERDEFINED. The pointer is valid only within the source type information object supplied with either the constructor for the CElemDesc object or the CElemDesc::Attach method. If the CElemDesc type is not VT_USERDEFINED, this method returns S_FALSE.
Reset (ELEMDESC *pElemDesc) Resets the internal ELEMDESC structure pointer to point to pElemDesc.
SetArrayData (ARRAYDESC *pArrayDesc) Sets data for a member of type VT_ARRAY. Call this method after calling SetType with the type set to VT_ARRAY. The pArrayDesc must be a valid safe array descriptor with a lifetime exceeding that of the CElemDesc object.
SetIDLDesc (IDLDESC IdlDesc) Sets data in the IDLDESC structure.`
SetName (BSTR bstrName) Sets the name of an element.
CElemDesc *SetNext (CElemDesc * pNext) Sets the next CElemDesc object in a list.
SetParamDesc (PARAMDESC ParamDesc) Sets data in the PARAMDESC structure.
SetType (VARTYPE vt, int iIndirectionCt) Sets the type of the CElemDesc object. Possible types are the same as those for an ELEMDESC object. Call SetType before you set any user defined data or array data.
SetUserDefinedData (ITypeInfo *ptiSrc) Sets data for a member of type VT_USERDEFINED. The ITypeInfo pointer identifies the user-defined type.

Operator Description
operator & Copies the contents of one CElemDesc object to another.
operator ELEMDESC Extracts the ELEMDESC structure from the CElemDesc object.

See Also

Step 2: Use Helper Classes to Add Methods and Properties