There is another problem with cdecl, because I need to put
[UnmanagedFunctionPointer(CallingConvention.xxx)]on any JNI delegate. Example is JNIEnv.AllocObject. I think I'll need to duplicate whole JNIEnv class in order to avoid condition for each call.
Last small problem is with JNI.Dll which has the main
[DllImport("jvm.dll", CallingConvention = CallingConvention.StdCall)], it must be duplicated as well, because there is jvm.so on Linux.
Currently I don't hear from people that they need Mono/Linux support for jni4net. If you think you need it, please tell us the use case. I'm interested to hear why Mono support is worth of the effort. Till then I put it on ice.