Hi Germic,
Try using a System.Text.StringBuilder instead of ref string.
Joe
--
http://www.csharp-station.com
"Germic" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> I need to pass a reference to a string between a C and C# library.
>
> I declare the string in C# function as ref String xyz and the
> corresponding
> C code would refer to it as BSTR *xyzz. However i get an error as i feel
> the
> string is not marshalled properly.
>
> What is the correct way to do this?
>
> Thanks
>
>