From: Ben Voigt [C++ MVP] on

"Bob Yang" <bobyang3(a)gmail.com> wrote in message
news:1191525195.906245.120660(a)57g2000hsv.googlegroups.com...
> thank you! great information.
>
> 2. if I have a c++ as (unsigned char[] ca1, char[] ca2), how can I
> call it correctly in c#? is it equal to (byte[] ca1, byte[] ca2)?

More precisely ca2 would be sbyte[], but byte[] should also work.

> Moreover, ca1 and ca2 are only passing IN the the value and c++ cannot
> change the value because it is not a pointer in c++?

The DLL cannot change the caller's variable to a different array. It can
however change the content of the array passed in the call, which is shared
with the caller.