I inherited a C++ DLL with its related header file, with functions declared like
int func1(int i);
int func2(char* s);
I also inherited a reference VC++ reference class that wraps the above DLL to be used in C# environment
public ref class MyWrapperClass
{
int func1_w(int i)
{
return func1(i);
}
int func2_w(char* s)
{
return func2(s);
}
}
From my C# application, I can use func1_w(int i), but I don't understand how to pass a string to func2_w(sbyte* s): I got an error about I can't get a pointer to an sbyte. I set the C# prject as unsafe and declared the function as unsafe.
How can I pass a sbyte* parameter to functiuon func2_w?