On Thu, Jan 25, 2001 at 02:20:42AM +0100, Harald Radi wrote:
> hi,
> i'm tricking around with the COM extension to fix the open bugs (and of
> course to satisfy my requirements).
> there are
> ---------------------
> if (pval_arg->is_ref == 0) { ... } else { ... }
> ---------------------
> constructs in the code, but how could this parameter be influenced in the
> php script ?

The PHP script can use & in front of an argument to pass it by reference.
If you always want it to be a reference, you do that in the C code, see
for instance the ldap extension and look for third_argument_force_ref.
First an array with this name is declared, then in the function table
you will find this again. There are also other examples there. You could
also look at the code for the functions to see how the arguments should
be handled. Hopefully the code is correct.

> i try to fix the 'pass by reference' problem in the com extension, but
> either i have to specify the behavior in the php script or i have to query
> the typelib if one of the parameters is expected by reference. the second
> way seems to be very time-consuming and is not always possible (some COM
> objects don't export a typelib).

You only want to force a reference if you want to alter the argument
inside the function I think. If you don't alter the argument, you
shouldn't need to care if they are references or not.

I'm not 100% certain about these things, if I'm wrong I hope someone
will correct me, so that I too can learn something (:

> another question to the core team:
> is it a problem to implement the COM extension as a cpp file, since the c
> com-interface is not well documented and doesn't support everything ?
> since this is only a win32 module it shouldn't be a problem, any objections
> ?

Can't answer this one.


PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to