<div class="content" name="GetContainingTypeLib" uuid="1a843f04-e55a-47dd-8502-6ba3cd94b161"><p>The GetContainingTypeLib method retrieves the <a href="5daecf67-bc6e-4e17-bcf8-797bdba1748b" data-linktype="relative-path">ITypeLib server</a> instance
whose type information table contains the ITypeInfo instance, and the index of
the ITypeInfo instance within the type information table.</p><dl>
<dd>
<div><pre> HRESULT GetContainingTypeLib(
   [out] ITypeLib** ppTLib,
   [out] UINT* pIndex
 );
</pre></div>
</dd></dl><p><b>ppTLib: </b>MUST be set to a reference to an
ITypeLib server instance (see section 3.11).</p><p><b>pIndex: </b>MUST be set to the index value of the
current <a href="5583e1b8-454c-4147-9f56-f72416a15bee#gt_fb6a1829-c102-482c-902f-51c197b22860" data-linktype="relative-path">automation type
description</a> within the type information table (see section <a href="87fd9a39-6067-42a7-b8e6-13637df3bd0d" data-linktype="relative-path">3.11.1</a>).</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>