#18900 [Opn->Csd]: com_invoke cannot find method

From: Date: Thu, 15 Aug 2002 00:26:35 +0000
Subject: #18900 [Opn->Csd]: com_invoke cannot find method
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16857@lists.php.net to get a copy of this message
ID: 18900 Updated by: phanto@php.net Reported By: mlorenz@novadys.com -Status: Open +Status: Closed Bug Type: COM related Operating System: Windows2000 Professional PHP Version: 4CVS-2002-08-14 New Comment: the functional and the oo api are not yet compatible. i suggest you to stick with the oo api because it is more consistent. com_invoke expects a resource as first parameter, but $DMDocList is an object because it was (implicitly) created with 'new' and not with com_load(). this is already unified in the upcoming new version that will ship with the next major php release (ZE2). Harald Previous Comments: ------------------------------------------------------------------------ [2002-08-14 06:54:33] mlorenz@novadys.com The last line of the following script raises an error 'Unable to lookup Add' $myDMMain = new COM("DMServ.DMMain.1") or die("could not create main"); $myDMConn = $myDMMain->Login("Novadys","",1033) or die("login failed"); $myDMImporter = new COM("Documind.DmImporter.1") or die("could not create importer"); $myDMImporter->Connection = $myDMConn; $myDMImporter->Archive = "files" or die ("kacke"); $myDMImporter->JobFlags = DMDoc_Import; $DMDocList = $myDMImporter->Documents or die ("could not create doclist"); $test=com_invoke($DMDocList,"Add","c:\\test.txt"); ... It seems that the call obj = (comval *)zend_list_find(Z_LVAL_P(object), &type); returns the wrong obj because obj->resourceindex is 1 but it has been set to 4 when the entry has been created in php_COM_set. Best regards, Michael ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18900&edit=1

« previous php.bugs (#16857) next »