Hi, I am trying to call a c++ shared library and the specifics of the call are as follows:
On the C++ end, I have a function like so: authenticate(WINID window, struct ModuleAndType *modules[], int size, const wchar_t* inToken, wchar_t** outToken) On the C# end, I have the following: [DllImport("AuthController")] private static extern uint authenticate( int hwnd, [MarshalAs(UnmanagedType.LPArray)] ref ModuleAndType[] modules, int size, [MarshalAs(UnmanagedType.LPWStr)] string inToken, [MarshalAs(UnmanagedType.LPWStr)] ref string outToken); This works fine under windows, but I am getting junk characters when running the same code In Suse Linux 10.0. I have Mono JIT 1.1.13.8 intalled. After initial searching on the Internet, I read that it was due to the number of bytes used by wchar_t in Windows and Linux. Mono seems to be marshalling it like windows wchar_t even on Linux and thus the junk characters. Is there a way I can get wchar_t to work through marshalling? Thanks in advance for your help, Cheers, Rajesh
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list