On Sat, 20 May 2000 21:19:04 +0200, "Rudi Farkas"
<[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote on 17 May 2000
>>> i took Jan's advice and started looking into the wide character API and
>>> stumbled across the (microsoft specific) class _bstr_t.
>
>If I understand correctly, Ed's problem turned out to be converting BSTR
>(16 bit character strings) to char* (8-bit character strings) and writing
>them to a text file from your COM object, NOT passing strings
>between Perl and COM.
>
>I have a related question:
>
>if I have COM properties or methods that just pass BSTR in and out of a
>COM object, similar to Ed's
> STDMETHODIMP CMyClass::put_String(BSTR newVal) { /*...*/ }
> STDMETHODIMP CMyClass::get_String(BSTR * pVal) { /*...*/ }
>and I successfully create an object with
> my $app = Win32::OLE->new(" ... progid of CMyClass ");
>these operations seem to work just fine on the Perl side:
> $app->{String} = 'my new string';
> print $app->{String};
>
>Why would I need to use Variant(VT_BSTR, 'my new string')?
You don't have to do this. It is done behind your back as the default
behavior already.
-Jan
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]