3
Reply

BSTR to String backwards marshaling

Opariti

Opariti

Aug 25 2008 12:40 PM
11.5k

Hi there!

I have a COM server at the lowest level of C++, closer to C. I have reached to connect it with a DLL in C#, sending strings from C# and getting BSTRs in COM. When I try to send backwords, i.e. BSTRs from C++ I'm having strange characters got in C#. Since the .net marshalling goes fine from C# to COM, what's the corresponding conversion method (or attribute) for "what I receive in C# from COM" to transform in the right string in C#? Thanks!


Answers (3)