[Mono-list] Mono/.NET delegate incompatibility

J. Perkins jason@379.com
19 Dec 2002 08:39:17 -0500


This is a good workaround. Thanks!

Jason
379

On Wed, 2002-12-18 at 18:43, Tum wrote:
> I guess the default calling convention in mono is cdecl.  According to
> MSDN, the default calling convention for dllimport should be stdcall
> (which IMHO really only makes sense on windows).
> 
> You could try setting the CallingConvention property on the DllImport to
> cdecl.
> 
> e.g.
> 
> [DllImport("mydll.dll", CallingConvention=CallingConvention.Cdecl)]
> public static extern void myfunc(int x);