ICreateTypeInfo::AddVarDesc
This method adds a data member description as a type description.
HRESULT AddVarDesc(
unsigned int index,
VARDESC FAR* pVarDesc
);
Parameters
- index
[in] Index of the variable or data member to be added to the type description. - pVarDesc
[in] Pointer to the variable or data member description to be added.
Return Values
The following table shows the return values for this function.
Value | Description |
---|---|
S_OK | Success. |
STG_E_INSUFFICIENTMEMORY | Out of memory. |
E_OUTOFMEMORY | Out of memory. |
E_INVALIDARG | One or more of the parameters is invalid. |
E_ACCESSDENIED | Cannot write to the destination. |
TYPE_E_WRONGTYPEKIND | Type mismatch. |
Remarks
The index specifies the order of the variables. The first variable has an index of zero. 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 member (oInst) of the VARDESC structure is ignored. This attribute is set only when ICreateTypeInfo::LayOut is called. Also, the member identifier members within the VARDESC structures are ignored unless the TYPEKIND of the class is TKIND_DISPATCH.
Any HREFTYPE members 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 member of the ELEMDESC.
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h, Oaidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.
See Also
ICreateTypeInfo | ELEMDESC | ICreateTypeInfo::LayOut | ITypeInfo | VARDESC
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.