Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method adds a function description as a type description.
Syntax
HRESULT AddFuncDesc( unsigned int index, FUNCDESC FAR* pFuncDesc ); |
Parameters
- index
-
[in] Index of the new FUNCDESCin the type information.
- pFuncDesc
-
[in] Pointer to a FUNCDESCstructure that describes the function. The bstrIDLInfomember in the FUNCDESCshould be set to NULL for future compatibility.
Return Value
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 FUNCDESCstructure to ICreateTypeInfo. Therefore, the caller must still deallocate the FUNCDESCstructure.
The passed-in virtual function table (VTBL) member ( oVft) of the FUNCDESCis ignored. This attribute is set when ICreateTypeInfo::LayOutis called.
The method AddFuncDescuses the passed-in member identifier members within each FUNCDESCfor classes with TYPEKIND = TKIND_DISPATCH or TKIND_INTERFACE.
If the member identifiers are set to MEMBERID_NIL, AddFuncDescassigns member identifiers to the functions. Otherwise, the member identifier members within each FUNCDESCare ignored.
Any HREFTYPEmembers in the FUNCDESCstructure must have been produced by the same instance of ITypeInfofor which AddFuncDescis called.
The getand putaccessor functions for the same property must have the same dispatch identifier (DISPID).
Requirements
Header | oaidl.h, oaidl.idl |
Library | oleaut32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |