ICreateTypeInfo::AddVarDesc method (oaidl.h)
Adds a variable or data member description to the type description.
Syntax
HRESULT AddVarDesc(
[in] UINT index,
[in] VARDESC *pVarDesc
);
Parameters
[in] index
The index of the variable or data member to be added to the type description.
[in] pVarDesc
A pointer to the variable or data member description to be added.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
One or more of the arguments is not valid. |
|
Insufficient memory to complete the operation. |
|
Cannot write to the destination. |
|
Insufficient memory to complete the operation. |
|
Type mismatch. |
Remarks
The index specifies the order of the variables. The first variable has an index of zero. ICreateTypeInfo::AddVarDesc returns an error if the specified index is greater than the number of variables currently in the type information. Calling this function does not pass ownership of the VARDESC structure to ICreateTypeInfo. The instance field (oInst) of the VARDESC structure is ignored. This attribute is set only when ICreateTypeInfo::LayOut is called. Also, the member ID fields within the VARDESCs are ignored unless the TYPEKIND of the class is TKIND_DISPATCH.
Any HREFTYPE fields in the VARDESC structure must have been produced by the same instance of ITypeInfo for which AddVarDesc is called.
AddVarDesc ignores the contents of the idldesc field of the ELEMDESC.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oaidl.h |