On Wed, 12 Oct 2011 17:10:09 +0100, Trass3r <u...@known.com> wrote:

        [DllImport("mydll.dll",
            CallingConvention = CallingConvention.Cdecl,
            SetLastError = false, CharSet = CharSet.Auto)]
            private static extern bool concatenate(
                string str1, // in
                string str2, // in
                StringBuilder strResult); // out

Question is if that StringBuilder really is equal to a char* in this case.

I believe it can/does work with C DLLs, for example:
http://www.pinvoke.net/default.aspx/kernel32/FormatMessage.html

The first C# FormatMessage signature shown there uses a StringBuilder on the C# side.

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to