Calling COM methods syntax question

From: Date: Mon, 22 Nov 1999 15:57:50 +0000
Subject: Calling COM methods syntax question
Groups: php.version4 
Request: Send a blank email to php-version4+get-6659@lists.php.net to get a copy of this message
I am having a problem getting a COM method to work. My COM objects properties work just fine: <?php $epx = new COM("Ebsco.EpxInterface.1") or die("Unable to instanciate WebToolkit"); $ver = $epx->Version; //this COM property works $status = $epx->Command("show"); //this COM method fails ?> Warning: PropGet() failed: Member not found. in D:\php_scripts\com.php on line 4 Fatal error: Call to undefined function: () in D:\php_scripts\com.php on line 4 Here is the COM IDL for the method Command: [id(0x0000005c), helpstring("method Command : Version")] BSTR Command([in] BSTR Command); Any ideas? thanks. > -----Original Message----- > From: Taras Tielkes [mailto:trtiekes@zap.a2000.nl] > Sent: Saturday, November 20, 1999 10:33 PM > To: php4beta@lists.php.net > Subject: Re: [PHP4BETA] Small question about COM syntax > > > ----- Original Message ----- > From: <rubys@us.ibm.com> > To: <php4beta@lists.php.net> > Sent: Sunday, November 21, 1999 3:30 AM > Subject: Re: [PHP4BETA] Small question about COM syntax > > > > "Taras Tielkes" writes: > > > $test = new COM("SmallCls"); > > > print $test->getClass()->toString(); // Gives parse error > > > > This appears to be a limitation of the zend parser. > Playing around with > > Java: > > > > $test = new Java("java.util.Date"); > > print $test->getClass()->toString(); // Gives parse error > > print $test->class->toString(); // Sat Nov 20 > 21:26:00 EST 1999 > > $temp = $test->class; > > print $temp->toString(); // class java.util.Date > > > > Only the last answer is correct. The middle one looks like > a bug. My > > preference would be that the first one be treated like a bug too. > > > > P.S. Your example looks suspiciously like Java to me... > > It is a normal Java class in /java/trustlib and registered into COM by > javareg. The MS JVM will automagically wrap it in > IDispatch(Ex) and some > other interfaces. > > Regards, > Taras > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: > php4beta-admin@lists.php.net >

« previous php.version4 (#6659) next »