<div class="content" name="GetFuncIndexOfMemId" uuid="9b417eae-849f-4608-89f0-60e3ea04d8a6"><p>The GetFuncIndexOfMemId method retrieves the location of an
element in the data member table, given its associated MEMBERID.</p><dl>
<dd>
<div><pre> HRESULT GetFuncIndexOfMemId(
   [in] MEMBERID memid,
   [in] INVOKEKIND invKind,
   [out] UINT* pFuncIndex
 );
</pre></div>
</dd></dl><p><b>memid: </b>MUST be a MEMBERID, as specified in
section <a href="ace8758f-ee2b-4cb6-8645-973994d12530" data-linktype="relative-path">2.2.35</a>.</p><p><b>invKind: </b>MUST be set to one of the values of
the INVOKEKIND enumeration (as specified in section <a href="a0d3598d-a3ee-4401-87fd-17a7031b0b9a" data-linktype="relative-path">2.2.14</a>) or to 0.</p><p><b>pFuncIndex: </b>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.</p><dl>
<dd>
<p>If invKind is not 0, the specified element is the
one whose MEMBERID matches the value of memid, and whose associated INVOKEKIND
constant (see <a href="d3349d25-e11d-4095-ba86-de3fda178c4e" data-linktype="relative-path">FUNCDESC</a>)
matches the value of invKind.</p>
</dd>
<dd>
<p>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.</p>
</dd></dl><p><b>Return Values: </b>The method MUST return
information in an HRESULT data structure, defined in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">2.1</a>.
The severity bit in the structure identifies the following conditions: </p><ul><li><p><span><span> 
</span></span>If the severity bit is set to 0, the method completed
successfully.</p>
</li><li><p><span><span> 
</span></span>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.</p>
</li><li><p><span><span> 
</span></span>If the severity bit is set to 1 and the entire HRESULT DWORD
matches a value in the following table, a failure occurred. </p>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x8002802B</p>
  <p>TYPE_E_ELEMENTNOTFOUND</p>
  </td>
  <td>
  <p>The values of <i>memid</i> and <i>invKind</i> did not
  specify a member of the type. See [MS-ERREF].</p>
  </td>
 </tr></tbody></table>
</li></ul><p> </p></div>