<div class="content" name="GetParamCustData" uuid="ed33bcd0-5422-43f5-9b65-7723a6e10280"><p>The GetParamCustData method retrieves the value of a custom
data item associated with the specified method parameter.</p><dl>
<dd>
<div><pre> HRESULT GetParamCustData(
   [in] UINT indexFunc,
   [in] UINT indexParam,
   [in] REFGUID guid,
   [out] VARIANT* pVarVal
 );
</pre></div>
</dd></dl><p><b>indexFunc: </b>MUST specify an ordinal position in
the method table and MUST be less than the value of the <b>cFuncs</b> field in
the TYPEATTR structure of the associated type, as specified in sections <a href="0ca10d08-61d2-4059-9109-7bbaf545715e" data-linktype="relative-path">2.2.44</a> and <a href="b96292a8-c06e-4b9c-905e-129b95697ee4" data-linktype="relative-path">3.7.4.1</a>.</p><p><b>indexParam: </b>MUST specify an ordinal position
in the parameter table of the method specified by <i>indexFunc</i>. The value
of <i>indexParam</i> MUST be less than the value of the <b>cParams</b> field in
the <a href="d3349d25-e11d-4095-ba86-de3fda178c4e" data-linktype="relative-path">FUNCDESC</a> structure
of the associated method, as specified in sections 2.2.42 and <a href="d54aca09-0565-4fa8-b5e4-cf87723a89ed" data-linktype="relative-path">3.7.4.3</a>.</p><p><b>guid: </b>MUST be the <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a> associated with the
custom data item using the [custom] attribute, as specified in section <a href="ff2bd74b-cb4d-48b3-ab89-6bb32cda3833" data-linktype="relative-path">2.2.49.6</a>.</p><p><b>pVarVal: </b>MUST be set to the value of the
custom data item, or to VT_EMPTY if the parameter does not have an associated
custom data item.</p><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 value of <i>indexFunc</i> did not specify the
  ordinal position of an element in the interface table, or the value of <i>indexParam</i>
  did not specify the ordinal position of an element in the method&#39;s parameter
  table. See [MS-ERREF].</p>
  </td>
 </tr></tbody></table>
</li></ul><p> </p></div>