Hi (Ciao) Marco,
thanks for your answer.
Debug.Print StrConv(Olaf.Var1, vbFromUnicode)
really prints
Changed.
a string whose length is 8.
All possibilities of passing stringdata from VB to C++ and back I found
so far worked with fixed-length strings in structures or passing the
length of the allocated space as another parameter.
Though I seemingly have to use StrConv do I now have a possibility to
pass a structure containing string-members where I in VB don't know
about the length of the strings they will be filled with in the C++ DLL.
Best regards and thanks again
Bernhard
----- Original Message -----
From: "Marco Straforini" <marco.straforini@c...>
To: "professional vb" <pro_vb@p...>
Sent: Monday, November 12, 2001 7:42 PM
Subject: [pro_vb] RE: C++ DLL to communicate with VB DLL
> That explains a lot.
> Your dll sends a BSTR (that is a wide string, two bytes per character)
and
> VB thinks it is a narrow string (one per character). How to tell it
> otherwise
> I do not know... as I said, I always implemented ActiveX dll's, that
use
> COM to communicate, and thus VB knows perfectly well it is Unicode.
> Maybe someone else in this forum knows the drill.
> Tell me if StrConv, using vbFromUnicode, helped
>