[Mono-osx] PInvoke to native method crashes after upgrading to Mono 2.10.1

jazzay jazzay at gmail.com
Sat Mar 12 18:39:46 EST 2011


For some reason since updating to Mono 2.10.1 (and 2.10 before that) I cannot
PInvoke into a simple native function with the following signature:

extern "C" int STDCALL CreateNativeObject(const char * _className);

>From my C# code I am specifying the function as follows:

[DllImport("Native.dll")]
private static extern int CreateNativeObject(
       [MarshalAs(UnmanagedType.LPStr)] string className);

I have tried various signature attributes based on your interop
documentation to no avail.

This worked fine with 2.8.2. Please help!

Jason






--
View this message in context: http://mono.1490590.n4.nabble.com/PInvoke-to-native-method-crashes-after-upgrading-to-Mono-2-10-1-tp3351044p3351044.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list