[Mono-devel-list] Heads up: calling convention for delegates on Windows

Bernie Solomon bernard at ugsolutions.com
Wed Oct 8 12:03:03 EDT 2003

Related to this I recently thought that shouldn't all the functions testing
in mono/tests be attributed as CallingConvention.Cdecl (though they seem to
work if
you build a libtest.dll but this may just be luck... - and I've been meaning
to get
libtest.dll built automatically but haven't done that yet...)

Bernie Solomon
----- Original Message ----- 
From: "Varga Zoltan" <vargaz at freemail.hu>
To: <mono-devel-list at ximian.com>
Sent: Wednesday, October 08, 2003 8:53 AM
Subject: [Mono-devel-list] Heads up: calling convention for delegates on

>                                              Hi All,
>   There is a bug in bugzilla about an incompatibility
> between mono and
> the MS runtime:
> http://bugzilla.ximian.com/show_bug.cgi?id=35987
> Currently, mono uses the default calling convention for the
> native-to-managed function wrappers it generates, while MS
> uses stdcall.
> Fixing it is fairly easy, but it will break existing code on
> Windows. If there
> is no objections, I will make this change. After this
> change, native
> code should declare the function pointers it uses to call
> back into
> managed code with the __stdcall attribute:
> typedef int (__stdcall *SimpleDelegate) (int a);
>                                                      bye
>                                                           Zoltan
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list