Bug #15655 Updated: Variant type & COM objects

From: Date: Mon, 11 Mar 2002 17:59:35 +0000
Subject: Bug #15655 Updated: Variant type & COM objects
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2237@lists.php.net to get a copy of this message
ID: 15655 Updated by: phanto@php.net Reported By: bartek@vemco.pl -Status: Open +Status: Closed Bug Type: COM related Operating System: WinNT SP6 PHP Version: 4.1.1 New Comment: you shouldn't have to encapsulate the $recordset instance into a VARIANT() object as this is done by the com layer implicitely. the VARIANT() class is only necessary if you want multiple indirections (e.g. you want to pass a pointer to the instance instead of the instance itself). so passing $recordset to $object2 should be enough. harald ps: if you still have troubles please also test it with the cgi version to check if it is apache related or a general com issue. Previous Comments: ------------------------------------------------------------------------ [2002-02-21 04:46:01] bartek@vemco.pl I have 2 COM objects and I want to pass 1 of them to another by reference. Apache 1.3.23 <? //first object is ADODB.recordset $recordset= new COM("ADODB.Recordset") or die("recodset down"); //I want this object to be passed by reference so i declare Variant type $rs=new Variant($recordset); //below lines are unimportant because I got Internal Server ERROR here $object2= new COM("object.object") or die ("object down"); $object2->ddw("sterfind",$rs); ?> when I declare $rs = new Variant() or $rs= new Variant(VT_DISPATCH) then script works but object2 reports type mismatch error_log raports: Premature end of script headers: c:/php/php.exe ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15655&edit=1

« previous php.bugs (#2237) next »