3.9.4.3 ITypeInfo2::GetFuncIndexOfMemId (Opnum 24)

The GetFuncIndexOfMemId method retrieves the location of an element in the data member table, given its associated MEMBERID.

 HRESULT GetFuncIndexOfMemId(
   [in] MEMBERID memid,
   [in] INVOKEKIND invKind,
   [out] UINT* pFuncIndex
 );

memid: MUST be a MEMBERID, as specified in section 2.2.35.

invKind: MUST be set to one of the values of the INVOKEKIND enumeration (as specified in section 2.2.14) or to 0.

pFuncIndex: MUST be set to the ordinal position in the method table of the element specified by the values of memid and invKind as described below, or to –1 if no such element exists.

If invKind is not 0, the specified element is the one whose MEMBERID matches the value of memid, and whose associated INVOKEKIND constant (see FUNCDESC) matches the value of invKind.

If invKind is 0, the specified element is the one with the lowest ordinal position in the method table whose MEMBERID matches the value of memid.

Return Values: The method MUST return information in an HRESULT data structure, defined in [MS-ERREF] section 2.1. The severity bit in the structure identifies the following conditions:

  • If the severity bit is set to 0, the method completed successfully.

  • If the severity bit is set to 1 and the entire HRESULT DWORD does not match a value in the following table, a fatal failure occurred.

  • If the severity bit is set to 1 and the entire HRESULT DWORD matches a value in the following table, a failure occurred.

    Return value/code

    Description

    0x8002802B

    TYPE_E_ELEMENTNOTFOUND

    The values of memid and invKind did not specify a member of the type. See [MS-ERREF].