Now that I know it is a string issue I did a little searching and I found this SO question.
So in the end I used the BSTR
approach.
BSTR SayHello() {
return ::SysAllocString(L"Hello");
}
[DllImport("DBReplicator.Lib.dll")]
[return: MarshalAs(UnmanagedType.BStr)]
public static extern string SayHello();
... Still don't know how I managed to get Chinese characters though.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…