Opariti

Opariti

  • NA
  • 24
  • 0

BSTR to String backwards marshaling

Aug 25 2008 12:40 PM

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)