Thanks Nicholas, I have control over the dll so I can add a new method that
takes a null terminated char string and make the conversion there.
/Henke
Quote:
> Henke,
> No, there is not. You can create another dll that wraps your dll and
> then exposes the parameter as something the framework would understand (a
> null terminated character string, or a BSTR).
> Hope this helps.
> --
> - Nicholas Paldino [.NET/C# MVP]
> > Hi!
> > I have imported a function from a Win32-dll to my C# project. The
function
> > in the dll takes a basic_string, or actually a const basic_string&, as
> > argument. Is it possible to convert a C#-string to a basic_string.
> > With basic_string I mean:
> > #include <string>
> > std::string str;
> > Thanks in advance!
> > /Henke