Bug #16919 Updated: Can only run one Com Object per PHP page.

From: Date: Fri, 03 May 2002 23:46:04 +0000
Subject: Bug #16919 Updated: Can only run one Com Object per PHP page.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6864@lists.php.net to get a copy of this message
ID: 16919 Updated by: phanto@php.net Reported By: shelley@databyte.com -Status: Open +Status: Assigned Bug Type: COM related Operating System: windows 2000 Server PHP Version: 4.1.2 -Assigned To: +Assigned To: phanto New Comment: please send the dll to harald.radi@nme.at . Previous Comments: ------------------------------------------------------------------------ [2002-04-29 18:41:26] shelley@databyte.com if you run the following script you will see that only one of the Com objects will run at a time. if you try to run both you will recieve a lookup error on the second invoke on method(method2) if you switch them both $z first you will get it on the method1. which every Com has been created first the other will produce the error message. If you run one at a time everything is fine. If you Contact me I will send you the dll to run with this PHP page. Since I can't attach it. You will need the dll to run with this sample. You should recieve an Look up error on $nfoo=com_invoke($z,"method2",$age,$grade); <html> <head> <meta name="GENERATOR" content="Workorder Databyte"> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http_equiv="cache-control" content="no-cache"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </head> <body> <? $myname='shelley'; $country='canada'; $age='99'; $grade='23'; $a = new COM("tstproj.myclass1") or die ("Com Class not found"); $z = new COM("tstproj.myclass2") or die ("Com Class not found"); $foo=com_invoke($a,"method1",$myname,$country); // calling second Com method $nfoo=com_invoke($z,"method2",$age,$grade); ?> </body> </html> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16919&edit=1

« previous php.bugs (#6864) next »