cvs: phpdoc /en/faq com.xml

From: Date: Thu, 01 Nov 2001 20:27:47 +0000
Subject: cvs: phpdoc /en/faq com.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969338429@lists.php.net to get a copy of this message
phanto Thu Nov 1 15:27:47 2001 EDT Modified files: /phpdoc/en/faq com.xml Log: faq update Index: phpdoc/en/faq/com.xml diff -u phpdoc/en/faq/com.xml:1.1 phpdoc/en/faq/com.xml:1.2 --- phpdoc/en/faq/com.xml:1.1 Wed Oct 3 12:00:12 2001 +++ phpdoc/en/faq/com.xml Thu Nov 1 15:27:47 2001 @@ -1,11 +1,11 @@ <?xml encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <chapter id="faq.com"> <title>PHP and COM</title> <titleabbrev>PHP and COM</titleabbrev> <para> - intro blah .. + PHP can be used to access COM and DCOM objects on Win32 platforms. </para> <qandaset> @@ -15,10 +15,8 @@ </question> <answer> <para> - yes. - <programlisting> - ... - </programlisting> + If this is a simple DLL there is no way yet to run it from PHP. If the DLL contains a COM + server you may be able to access it if it implements the IDispatch interface. </para> </answer> </qandaentry> @@ -29,7 +27,12 @@ </question> <answer> <para> - array, blah .. + There are dozens of VARIANT types and combinations of them. Most of them are already supported but + a few still have to be implemented. + Arrays are not completely supported. Only single dimensional indexed + only arrays can be passed between PHP and COM. + If you find other types that aren't supported, please report them as a bug (if not already reported) + and provide as much information as available. </para> </answer> </qandaentry> @@ -40,7 +43,10 @@ </question> <answer> <para> - yes and no, blah .. + Generally it is, but as PHP is mostly used as a web scripting language it runs in the web servers context, thus + visual objects will never appear on the servers desktop. + If you use PHP for application scripting e.g. in conjunction with PHP-GTK there is no limitation in accessing and + manipulating visual objects through COM. </para> </answer> </qandaentry> @@ -51,7 +57,7 @@ </question> <answer> <para> - no, blah .. + No, you can't. COM instances are treated as resources and therefore they are only available in a single script's context. </para> </answer> </qandaentry> @@ -62,7 +68,8 @@ </question> <answer> <para> - IErrorInfo, blah .. + Currently it's not possible to trap COM errors beside the ways provided by PHP itself (@, track_errors, ..), but we are + thinking of a way to implement this. </para> </answer> </qandaentry> @@ -73,7 +80,7 @@ </question> <answer> <para> - no, ... + No, unfortunatelly there is no such tool available for PHP. </para> </answer> </qandaentry> @@ -84,7 +91,24 @@ </question> <answer> <para> - no, ... + This error can have multiple reasons: + <itemizedlist> + <listitem> + <simpara> + the CLSID is wrong + </simpara> + </listitem> + <listitem> + <simpara> + the requested DLL is missing + </simpara> + </listitem> + <listitem> + <simpara> + the requested component doesn't implement the IDispatch interface + </simpara> + </listitem> + </itemizedlist> </para> </answer> </qandaentry> @@ -95,7 +119,11 @@ </question> <answer> <para> - no, ... + Exactly like you run local objects. You only have to pass the ip of the remote machine as second parameter to + the COM constructor. + </para> + <para> + Make sure that you have set <literal>com.allow_dcom=true</literal> in your <literal>php.ini</literal>. </para> </answer> </qandaentry> @@ -106,88 +134,90 @@ </question> <answer> <para> - blah + Edit your <literal>php.ini</literal> and set <literal>com.allow_dcom=true</literal>. </para> </answer> </qandaentry> <qandaentry id="faq.com.q10"> <question> - <para>How can I run COM object from remote server ?</para> + <para>Is it possible to load/manipulate an ActiveX object in a page with PHP ?</para> </question> <answer> <para> - blah + This has nothing to do with PHP. ActiveX objects are loaded on client side if they are requested + by the HTML document. There is no relation to the PHP script and therefore there is no direct + server side interaction possible. </para> </answer> </qandaentry> <qandaentry id="faq.com.q11"> <question> - <para>Is it possible to load/manipulate an ActiveX object in a page with PHP ?</para> + <para>Is it possible to get a running instance of a component ?</para> </question> <answer> <para> - blah + This is possible with the help of monikers. If you want to get multiple references to the same word instance + you can create that instance like shown: </para> - </answer> - </qandaentry> - - <qandaentry id="faq.com.q12"> - <question> - <para>Is it possible to get a running instance of a component ?</para> - </question> - <answer> + <programlisting> + $word = new COM("C:\docs\word.doc"); + </programlisting> <para> - blah + This will create a new instance if there is no running instance available or it will return a handle to the + running instance, if available. </para> </answer> </qandaentry> - <qandaentry id="faq.com.q13"> + <qandaentry id="faq.com.q12"> <question> <para>Is there a way to handle an event sent from COM object ?</para> </question> <answer> <para> - blah + Not yet. </para> </answer> </qandaentry> - <qandaentry id="faq.com.q14"> + <qandaentry id="faq.com.q13"> <question> <para>I'm having problems when trying to invoke a method of a COM object wich exposes more than one interface. What can I do ?</para> </question> <answer> <para> - blah + The answer is as simple as unsatisfying. I don't know exactly but i think you can do nothing. + If someone has specific information about this, please let <ulink url="mailto:harald.radi@nme.at">me</ulink> know :) </para> </answer> </qandaentry> - <qandaentry id="faq.com.q15"> + <qandaentry id="faq.com.q14"> <question> - <para>So Php4 works with COM, how about COM+ ?</para> + <para>So PHP works with COM, how about COM+ ?</para> </question> <answer> <para> - blah + COM+ extends COM by a framework for managing components through MTS and MSMQ but there is nothing special that + PHP has to support to use such components. </para> </answer> </qandaentry> - <qandaentry id="faq.com.q16"> + <qandaentry id="faq.com.q15"> <question> <para>If PHP can manipulate COM objects, can we imagine to use MTS to manage components resources, in conjunction with PHP ?</para> </question> <answer> <para> - blah + PHP itself doesn't handle transactions yet. Thus if an error occours no rollback is initiated. If you use components that + support transactions you will have to implement the transaction management yourself. </para> </answer> </qandaentry> - + </qandaset> </chapter>

« previous php.doc (#969338429) next »