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

Varga Zoltan vargaz at freemail.hu
Wed Oct 8 11:53:24 EDT 2003

                                             Hi All,

  There is a bug in bugzilla about an incompatibility
between mono and
the MS runtime:


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);



More information about the Mono-devel-list mailing list