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
Hi Jan
You wrote on 17 May 2000
>>use Win32::OLE::Variant;
>>my $var = Variant(VT_BSTR, '');
>>$myFirstComObject->writeStringToFile($var);
[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 spec
okay, time to take this one OT...
i found a wonderful solution, and i just wanted to post it in case anyone
was following this thread...
Jan told me (thanks again Jan... you saved me a couple of hours of
continuing to try to get VariantChangeType() to convert the BSTR :-) :
> You got a VT_BSTR V
Jan,
> You got a VT_BSTR VARIANT alright, but to translate it to a char*, you
> need to convert wide characters to multibyte characters, which
> VariantChangeType() won't do for you. Alternatively you can
> use the wide
> character API to write the string directly, using the BSTR value as a
> w
Jan,
> You got a VT_BSTR VARIANT alright, but to translate it to a char*, you
> need to convert wide characters to multibyte characters, which
> VariantChangeType() won't do for you. Alternatively you can
> use the wide
> character API to write the string directly, using the BSTR value as a
> w
On Wed, 17 May 2000 12:58:49 -0400, "MacDonald, Ed, CON, OASD(HA)/TMA"
<[EMAIL PROTECTED]> wrote:
>i've recently started studying com with the intent of writing components
>that support ole automation. i could bombard this list with countless
>questions (learing com / ole automation is proving to
Chris,
> Have your tried:
>
> use Win32::OLE::Variant;
> my $var = Variant(VT_BSTR, '');
> $myFirstComObject->writeStringToFile($var);
>
> According to the Win32::OLE::Variant documentation,
> that _should_ work (note the emphasis on 'should' :)
>
> Regards,
> Chris
EXACTLY what i needed
> my question, however, is how does perl interact with ole
> (IDispatch) as far
> as strings are concerned. I'm not expecting a long answer... what i would
> love to know is what kind of type i can expect to be passed to my function
> when i call the "writeStringToFile" function below (i.e. BSTRIN
i've recently started studying com with the intent of writing components
that support ole automation. i could bombard this list with countless
questions (learing com / ole automation is proving to be a worthy challenge)
but this isn't the place for such questions. however, i do have one question
t