Re: COM - accessing pointer variables
| From: | park | Date: | Wed, 19 Sep 2001 07:50:52 +0000 |
| Subject: | Re: COM - accessing pointer variables | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-9411@lists.php.net to get a copy of this message | ||
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" <alain@samoun.com> wrote in message
news:NDBBKDPANIGMPIPILNBBEEKLDAAA.alain@samoun.com...
> Do you have a VB script showing how it connects to your COM object?
> Alain
>
>
> -----Original Message-----
> From: park [mailto:park99@freenet.co.uk]
> Sent: Tuesday, September 18, 2001 3:18 AM
> To: php-windows@lists.php.net
> 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: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>