2.2.42 FUNCDESC

The FUNCDESC structure is used by an ITypeComp server or ITypeInfo server to describe a method, as specified in sections 3.5.4.1 and 3.7.4.3.

 typedef struct tagFUNCDESC {
   MEMBERID memid;
   [size_is(cReserved2)] SCODE* lReserved1;
   [size_is(cParams)] ELEMDESC* lprgelemdescParam;
   FUNCKIND funckind;
   INVOKEKIND invkind;
   CALLCONV callconv;
   SHORT cParams;
   SHORT cParamsOpt;
   SHORT oVft;
   SHORT cReserved2;
   ELEMDESC elemdescFunc;
   WORD wFuncFlags;
 } FUNCDESC,
  *LPFUNCDESC;

memid: MUST be set to the MEMBERID (section 2.2.35) of the method.

lReserved1: MUST be set to 0 and ignored on receipt. An HRESULT value is closely related, or identical to an SCODE.

lprgelemdescParam: MUST refer to an array of ELEMDESC that contains one entry for each element in the method's parameter table.

The lprgelemdescParam array MUST NOT include parameters that are declared with the [lcid] or [retval] attributes if the value of funckind is FUNC_DISPATCH (as specified in section 3.1.4.4.2).

funckind: MUST be set to one of the values of the FUNCKIND (section 2.2.12) enumeration.

invkind: MUST be set to one of the values of the INVOKEKIND (section 2.2.14) enumeration.

callconv: MUST be set to one of the values of the CALLCONV (section 2.2.10) enumeration.

cParams: MUST be set to the length of the lprgelemdescParam array.

cParamsOpt: SHOULD be set to the number of optional VARIANT parameters<21>. MUST be set to -1 if the method was declared with the [vararg] attribute. Otherwise, MUST be set to 0.

oVft: MUST be set to either 0 or to the opnum of the interface method multiplied by the system pointer size value (as specified in sections 2.2.44 and 3.11.1).

cReserved2: MUST be set to 0, and ignored on receipt.

elemdescFunc: MUST contain an ELEMDESC that specifies the return type of the method, as specified in section 2.2.41.

wFuncFlags: MUST be set to a combination of the FUNCFLAGS bit flags (as specified in section 2.2.11), or set to 0.