A FUNCDESC describes a function, and is defined as follows:

typedef struct tagFUNCDESC {

MEMBERID memid; // Function member ID

SCODE FAR* lprgscode; // Legal SCODES for the function.

ELEMDESC FAR* lprgelemdescParam; // Array of parameter types

FUNCKIND funckind; // specifies whether the function is // virtual, static, or dispatch-only.

INVOKEKIND invkind; // Invocation kind; indicates if this is a //property function and if so, what kind.

CALLCONV callconv; // Specifies the function's calling // convention.

short cParams; // Count of total number of parameters.

short cParamsOpt; // Count of optional parameters (detailed

// description below).

short oVft; // For FUNC_VIRTUAL, specifies the offset in // the virtual function table.

short cScodes; // Count of permitted Scodes.

ELEMDESC elemdescFunc; // Contains the return type of the function.

unsigned short wFuncFlags; // See below for definition of flags.


The field cParams specifies the total number of required and optional parameters.

The cParamsOpt field specifies the form of optional parameters accepted by the function, as follows:

  • A value of 0 specifies that no optional arguments are supported.

  • A value of pics/OLE00090001.gif1 specifies that the method's last parameter is a pointer to a safe array of variants. Any number of variant arguments greater than cParams pics/OLE00090001.gif1 must be packaged by the caller into a safe array and passed as the final parameter. This array of optional parameters must be freed by the caller after control is returned from the call.

  • Any other number indicates that the last n parameters of the function are variants and need not be specified explicitly by the caller. The parameters left unspecified should be filled in by the compiler or interpreter as variants of type VT_ERROR with the value DISP_E_PARAMNOTFOUND.

The fields cScodes and lprgscode store the count and the set of errors that a function can return. If cScodes = pics/OLE00090001.gif1 then the set of errors is unknown.
If cScodes = pics/OLE00090001.gif1 or cScodes = 0, then lprgscode is undefined.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database