I'm trying to make a managed C++ Dll to wrap a standard C Dll but run into some problems when I want to pass strings from my C# application to the managed dll.
My question is which way is the easiest to pass strings from my C# application to the managed Dll?
The code for the wrapper is listed below.
MTP1Wrapper.Class1 cl = new MTP1Wrapper.Class1();
public __gc class Class1
int Open(char* strPort)
int status = MTP1_Open(&hMTP1,
int Send(int man, unsigned char* data, int length)
int status = MTP1_Send(hMTP1, man, 1, data, length);