<div class="content" name="GetDocumentation2" uuid="541262a3-d870-4c8e-be31-1eb6ab1d9259"><p>The GetDocumentation2 method retrieves values associated
with a type member.</p><dl>
<dd>
<div><pre> HRESULT GetDocumentation2(
   [in] MEMBERID memid,
   [in] LCID lcid,
   [in] DWORD refPtrFlags,
   [out] BSTR* pbstrHelpString,
   [out] DWORD* pdwHelpStringContext,
   [out] BSTR* pbstrHelpStringDll
 );
</pre></div>
</dd></dl><p><b>memid: </b>MUST be the MEMBERID of a member of the
type (as specified in section <a href="ace8758f-ee2b-4cb6-8645-973994d12530" data-linktype="relative-path">2.2.35</a>), or MEMBERID_NIL. </p><dl>
<dd>
<p>If <i>memid</i> is MEMBERID_NIL, the values of <i>pBstrHelpString</i>,
<i>pdwHelpStringContext</i>, and <i>pBstrHelpStringDll</i> MUST correspond to
the attributes declared with the type as specified in <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 member of the
type.</p>
</dd></dl><p><b>lcid: </b>MUST be the Locale ID associated with
the specified type member.</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>TYPEINFO_HelpStringArg 0x00000001</td>
  <td>MUST specify that the client is interested in the actual pBstrHelpString [out] argument.</td>
 </tr><tr>
  <td>TYPEINFO_HelpStringContextArg 0x00000002</td>
  <td>MUST specify that the client is interested in the actual pdwHelpStringContext [out] argument.</td>
 </tr><tr>
  <td>TYPEINFO_HelpStringDllArg 0x00000004</td>
  <td>MUST specify that the client is interested in the actual pBstrHelpStringDll [out] argument.</td>
 </tr></tbody></table><p><b>pbstrHelpString: </b>If the
TYPEINFO_HelpStringContextArg and TYPEINFO_HelpStringDllArg bit flags are set
in <i>refPtrFlags</i>, <i>pbstrHelpString</i> MUST be set to an implementation-specific
BSTR<a id="Appendix_A_Target_60"></a><a aria-label="Product behavior note 60" href="ae19ad63-7433-4568-88e9-f70e5593547d#Appendix_A_60" data-linktype="relative-path">&lt;60&gt;</a> . Otherwise, MUST be set to a
NULL BSTR.</p><p><b>pdwHelpStringContext: </b>MUST be set to the value
that was associated with the specified type or type member using the
[helpstringcontext] attribute (see <a href="ae4d27fa-faaa-4d5f-b0f9-15bfbaaae9b4" data-linktype="relative-path">IDL Automation Scope</a>) if
the TYPEINFO_HelpStringContextArg 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 member
using the [helpstringdll] attribute (see IDL Automation Scope) if the
TYPEINFO_HelpStringDllArg 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>