Well if I have a func like this ( im trying to get it to work with the
simplist case now )

HRESULT test( [ out, ref ] unsigned char *n );

I can call that from PERL like

use Win32::OLE;
use Win32::OLE::Variant;

$obj = Win32::OLE->new( "comobjectname" );
$n = Variant( VT_UI1 | VT_BYREF, 0 );
$obj->test( $n );

Unfortunatly I prefer PHP's sytax to perl's ( a LOT ) so I tried duplicating
that in PHP, and got

$obj = new COM( "comobjectname" );
$n = new VARIANT( 0, VT_UI1 | VT_BYREF );
$obj->test( $n );

I get a | Warning: Invoke() failed: Type mismatch in <filename> on line
<line>

I cant see what I'm doing wrong as it works in PERL and they both use the
same IDispath style of interface ?

Two, other points....
1. How do I release my COM object ?, I thought I'd have to use the IUnknown
interface's Release() func to decrease the ref-count.  But can I call that
from a IDispatch interface ?  If not how DO I release my object

2. Can I pass strings - I read in the php.dev archive an article saying that
array passing to COM wasnt implemented yet.  Is it ?

Please help if you can

Park


"Alain Samoun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm not sure, but try:
> $str = new VARIANT($obj->Get_Version_Str() , VT_STR | VT_BYREF );
> or simply:
>  $str = $obj->Get_Version_Str();
> Also, are you sure that release() is part of your object definition?
>
> > $obj->Release();
> Alain




-- 
PHP Windows 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