<div class="content"><p>The GetDocumentation2 method retrieves values associated
with the <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_4057fc86-007f-496f-a966-01c762088a8e" data-linktype="relative-path">automation type
library</a>.</p><dl>
<dd>
<div><pre> HRESULT GetDocumentation2(
   [in] INT index,
   [in] LCID lcid,
   [in] DWORD refPtrFlags,
   [out] BSTR* pbstrHelpString,
   [out] DWORD* pdwHelpStringContext,
   [out] BSTR* pbstrHelpStringDll
 );
</pre></div>
</dd></dl><p><b>index: </b>MUST be equal to the index of an <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_fb6a1829-c102-482c-902f-51c197b22860" data-linktype="relative-path">automation type description</a>
or to –1. If index is –1, the values of <i>pBstrHelpString</i>, <i>pdwHelpStringContext</i>,
and <i>pBstrHelpStringDll</i> MUST correspond to the attributes declared with
the Type library as specified in section <a href="7b5fa59b-d8f6-4a47-9695-630d3c10363e" data-linktype="relative-path">2.2.49.3</a>. Otherwise, they
MUST correspond to the attributes declared with the specified type.</p><p><b>lcid: </b>MUST be the locale ID of the specified
type or type library.</p><p><b>refPtrFlags: </b>MUST be 0, or a combination of
the bit flags specified in the following table.</p><table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>TYPELIB_HelpStringArg</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>MUST specify that the client is interested in the
  actual <i>pBstrHelpString</i> [out] argument.</p>
  </td>
 </tr><tr>
  <td>
  <p>TYPELIB_HelpContextArg</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>MUST specify that the client is interested in the
  actual <i>pdwHelpStringContext</i> [out] argument.</p>
  </td>
 </tr><tr>
  <td>
  <p>TYPELIB_HelpFileArg</p>
  <p>0x00000004</p>
  </td>
  <td>
  <p>MUST specify that the client is interested in the
  actual <i>pBstrHelpStringDll</i> [out] argument.</p>
  </td>
 </tr></tbody></table><p><b>pbstrHelpString: </b>MUST be set to an
implementation-specific <a href="9c5a5ce4-ff5b-45ce-b915-ada381b34ac1" data-linktype="relative-path">BSTR</a>
type<a id="Appendix_A_Target_63"></a><a aria-label="Product behavior note 63" href="ae19ad63-7433-4568-88e9-f70e5593547d#Appendix_A_63" data-linktype="relative-path">&lt;63&gt;</a> if the TYPELIB_HelpStringArg
bit flag is set in <i>refPtrFlags</i>. MUST be set to a NULL BSTR otherwise.</p><p><b>pdwHelpStringContext: </b>MUST be set to the value
that was associated with the specified type or type library using the
[helpstringcontext] attribute (see section <a href="ae4d27fa-faaa-4d5f-b0f9-15bfbaaae9b4" data-linktype="relative-path">2.2.49.2</a>) if the
TYPELIB_HelpContextArg bit flag is set in <i>refPtrFlags</i>. MUST be set to 0
otherwise.</p><p><b>pbstrHelpStringDll: </b>MUST be set to the
documentation string that was associated with the specified type or type
library using the [helpstringdll] attribute (see section 2.2.49.2) if the
TYPELIB_HelpFileArg bit flag is set in <i>refPtrFlags</i>. MUST be set to a
NULL BSTR otherwise.</p><p><b>Return Values: </b>The method MUST return
information in an <b>HRESULT</b> 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, the method failed and
encountered a fatal error.</p>
</li></ul></div>