Re: Passing pointers to a COM object

From: Date: Wed, 30 Apr 2003 19:02:22 +0000
Subject: Re: Passing pointers to a COM object
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145842@lists.php.net to get a copy of this message
At 13:34 30.04.2003, Aaron said: --------------------[snip]-------------------- >I develop a P2P application called Nova (http://novap2p.sourceforge.net/) >written in PHPGTK which uses a COM object called GnucDNA >(http://www.gnucleus.net/GnucDNA/). The problem is the COM object was >programmed in a language that supports pointers (C++) and some of the >methods require pointer arrays to be passed as parameters (example: >http://www.gnucleus.net/GnucDNA/docs/interfaces/ISearch.html#StartMetaSearch >). > >Now ive experimented with references and many other techniques all with no >luck (type mismatch errors). Perhaps there is an extension, workaround or >other solution that may enable me to pass pointers to the COM object. --------------------[snip]-------------------- I don't believe it's possible since a pointer concept is completely missing in PHP. What you could do is develop a "var2ptr" COM object that receives values which are passed by PHP, stores them in its own (shared) memory space and passes pointers to the original COM you want to call. While I'm typing I'm envisioning a generic "comcall" object that can be scripted, or reads an ini file, to allow calling any COM object, and any interface method, regardless of its parameter types. Well, just dreaming - no time just now ;-) -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#145842) next »