Hi Everybody.
I've got to use the following function of a C++ DLL:
CT_data (
unsigned short Ctn,
unsigned char *Dad,
unsigned char *Sad,
unsigned short Lc,
unsigned char *Cmd,
unsigned short *Lr,
unsigned char *Rsp
);
I've declared the following
[DllImport("ctscrw2k.dll", SetLastError=true, CharSet=CharSet.Ansi)]
private static extern int CT_data(ushort Ctn, ref ushort Dad, ref ushort
Sad, ushort Lc, char[] Cmd, ref ushort Lr, ref char[] Rsp);
The parameters Cmd and Rsp each are char[] arrays. The last parameter Rsp
is used as an response buffer, an i need to get a reference to the
RSP value to the imported function.
I always get this Exception:
Type System.Char[] can not be marshaled as an unmaneged structure; no
meaningful size or offset can be computed.
How can i solve this problem?
Regards
Mario Schymura