COM problem: help

From: Date: Wed, 19 Sep 2001 20:57:13 +0000
Subject: COM problem: help
Groups: php.dev 
Request: Send a blank email to php-dev+get-66237@lists.php.net to get a copy of this message
I have an interface like this: interface ITest { HRESULT foo( [ out ] int *n ); HRESULT bar( [ out, string ] char *str ); }; I can call the first one from PH, but ONLY if I make the variable 'n' of type [ out, retval ]. My understanding is that I should be able to call it like this. $obj = new COM( "mycomobject.test" ); $n = new VARIANT( 0, VT_UI1 | VT_BYREF ); $obj->foo( $n ); but when I try this, it dosent work What am I missing ? asuming I'm missing something, can I do the same thing with a string. What I want to do is pass strings back from my COM object. I read that there is no support for VARIANT arrays, but I see you support VT_BSTR. So can I have strings as out params. If not I'm going to have to move to another scripting language ( for this project ). Aside from that - PHP is great, its like scripting C++ ... so the best of both worlds. Rich

« previous php.dev (#66237) next »