Im afraid I dont know VB script so I cant tell you, to call it from C you
would use:

ITest *ptr = CoCreateObject( CLSID_Test...... )

char str[ 1024 ];
ITest->Get_Version_Str( str, sizeof( str ) );

// str contains the version string

ITest->Release();


Last night I looked through the php source code and am pretty shure it needs
calling something like

$obj = new COM( "Test.test" );
$str = new VARIANT( "a very long string, so that sizeof string can handle
returned string, is there a better way ?", VT_STR | VT_BYREF );

$obj->Get_Version_Str( $str );
$obj->Release();

Unfortunatly, whenever I try creating a variable of type VARIANT ( even if
its just )
$o = new VARIANT();
My script hangs, forever!!!

Also I cant call Release - Its a member of IUnknown so I thought I would be
able to ?


All help will be apreciated.

Park



"Alain Samoun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Do you have a VB script showing how it connects to your COM object?
> Alain
>
>
> -----Original Message-----
> From: park [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 18, 2001 3:18 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] COM - accessing pointer variables
>
>
> I have a method into my COM object specified as:
>
> HRESULT Get_Version_Str( [ in, out, size_is( size ) ] unsigned char *str,
> [ in ] unsigned long size );
>
> now how do I call this from PHP ?
> I think that I need to create the arg's as VARIANT but I cant get it to
work
> :(
>
> please help
>
> park
>
>
>
>
>
> --
> 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]
>



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