ICreateTypeInfo::AddFuncDesc
This method adds a function description as a type description.
HRESULT AddFuncDesc(
unsigned int index,
FUNCDESC FAR* pFuncDesc
);
Parameters
- index
[in] Index of the new FUNCDESC in the type information. - pFuncDesc
[in] Pointer to a FUNCDESC structure that describes the function. The bstrIDLInfo member in the FUNCDESC should be set to NULL for future compatibility.
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 functions within the type information. The first function has an index of zero. If an index is specified that exceeds one less than the number of functions in the type information, an error is returned. Calling this function does not pass ownership of the FUNCDESC structure to ICreateTypeInfo. Therefore, the caller must still de-allocate the FUNCDESC structure.
The passed-in virtual function table (VTBL) member (oVft) of the FUNCDESC is ignored. This attribute is set when ICreateTypeInfo::LayOut is called.
The method AddFuncDesc uses the passed-in member identifier members within each FUNCDESC for classes with TYPEKIND = TKIND_DISPATCH or TKIND_INTERFACE. If the member identifiers are set to MEMBERID_NIL, AddFuncDesc assigns member identifiers to the functions. Otherwise, the member identifier members within each FUNCDESC are ignored.
Any HREFTYPE members in the FUNCDESC structure must have been produced by the same instance of ITypeInfo for which AddFuncDesc is called.
The get and put accessor functions for the same property must have the same dispatch identifier (DISPID).
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h, Oaidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.
See Also
ICreateTypeInfo | FUNCDESC | ICreateTypeInfo::LayOut
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.