<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.com.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.com-load-typelib.php',
    1 => 'com_load_typelib',
    2 => 'Loads a Typelib',
  ),
  'up' => 
  array (
    0 => 'ref.com.php',
    1 => 'COM Functions',
  ),
  'prev' => 
  array (
    0 => 'function.com-get-active-object.php',
    1 => 'com_get_active_object',
  ),
  'next' => 
  array (
    0 => 'function.com-message-pump.php',
    1 => 'com_message_pump',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/com/functions/com-load-typelib.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.com-load-typelib" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">com_load_typelib</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">com_load_typelib</span> &mdash; <span class="dc-title">Loads a Typelib</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.com-load-typelib-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>com_load_typelib</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$typelib</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$case_insensitive</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Loads a type-library and registers its constants in the engine, as though
   they were defined using <span class="function"><a href="function.define.php" class="function">define()</a></span>.
  </p>
  <p class="para">
   Note that it is much more efficient to use the <a href="com.configuration.php#ini.com.typelib-file" class="link">com.typelib-file</a> <var class="filename">php.ini</var> setting to pre-load and
   register the constants, although not so flexible.
  </p>
  <p class="para">
   If <a href="com.configuration.php#ini.com.autoregister-typelib" class="link">com.autoregister-typelib</a> is turned on, then
   PHP will attempt to automatically register the constants associated with a
   COM object when you instantiate it.  This depends on the interfaces
   provided by the COM object itself, and may not always be possible.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.com-load-typelib-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">typelib</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">typelib</code> can be one of the following:
       <ul class="itemizedlist">
        <li class="listitem">
         <p class="para">
          The filename of a <code class="literal">.tlb</code> file or the executable module
          that contains the type library.
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          The type library GUID, followed by its version number, for example
          <code class="literal">{00000200-0000-0010-8000-00AA006D2EA4},2,0</code>.
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          The type library name, e.g. <code class="literal">Microsoft OLE DB ActiveX Data
          Objects 1.0 Library</code>.
         </p>
        </li>
       </ul>
       PHP will attempt to resolve the type library in this order, as the
       process gets more and more expensive as you progress down the list;
       searching for the type library by name is handled by physically
       enumerating the registry until we find a match.
      </p>
     </dd>
    
    
     <dt><code class="parameter">case_insensitive</code></dt>
     <dd>
      <p class="para">
       The <code class="parameter">case_insensitive</code> behaves inversely to
       the parameter <code class="literal">$case_insensitive</code> in the <span class="function"><a href="function.define.php" class="function">define()</a></span>
       function.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.com-load-typelib-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>

</div><?php manual_footer($setup); ?>