<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >com_load_typelib</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="COM and .Net (Windows)" HREF="ref.com.html"><LINK REL="PREVIOUS" TITLE="com_isenum" HREF="function.com-isenum.html"><LINK REL="NEXT" TITLE="com_load" HREF="function.com-load.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.com-isenum.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.com-load.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.com-load-typelib" ></A >com_load_typelib</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN20966" ></A ><P > (PHP 4 >= 4.1.0, PHP 5)</P >com_load_typelib -- Loads a Typelib</DIV ><DIV CLASS="refsect1" ><A NAME="AEN20969" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >com_load_typelib</B > ( string typelib_name [, bool case_insensitive] )<BR ></BR ><P > Loads a type-library and registers its constants in the engine, as though they were defined using <A HREF="function.define.html" ><B CLASS="function" >define()</B ></A >. The <CODE CLASS="parameter" >case_insensitive</CODE > behaves in the same way as the parameter with the same name in the <A HREF="function.define.html" ><B CLASS="function" >define()</B ></A > function. </P ><P > <CODE CLASS="parameter" >typelib_name</CODE > can be one of the following: <P ></P ><UL ><LI ><P > The filename of a <TT CLASS="literal" >.tlb</TT > file or the executable module that contains the type library. </P ></LI ><LI ><P > The type library GUID, followed by its version number, for example <TT CLASS="literal" >{00000200-0000-0010-8000-00AA006D2EA4},2,0</TT >. </P ></LI ><LI ><P > The type library name, e.g. <TT CLASS="literal" >Microsoft OLE DB ActiveX Data Objects 1.0 Library</TT >. </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 ><P > Note that it is much more efficient to use the <A HREF="ref.com.html#ini.com.typelib-file" ><I CLASS="term" > <CODE CLASS="parameter" >com.typelib_file</CODE > </I ></A > configuration setting to pre-load and register the constants, although not so flexible. </P ><P > If you have turned on <A HREF="ref.com.html#ini.com.autoregister-typelib" ><I CLASS="term" > <CODE CLASS="parameter" >com.autoregister_typelib</CODE > </I ></A >, 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="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.com-isenum.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.com-load.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >com_isenum</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.com.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >com_load</TD ></TR ></TABLE ></DIV ></BODY ></HTML >