[Gtk-sharp-list] CallingConvention.Cdecl is not on every DllImport's in Gtk#

Jonathan Pryor jonpryor at vt.edu
Tue May 25 21:35:14 EDT 2010


On Tue, 2010-05-25 at 22:10 +0200, Ulrich Buchgraber wrote:
> Why are there not all [DllImport()]'s in the Gtk# sources flagged with
> theCallingConvention.Cdecl attribute?

That's because Gtk# was originally started as a binding under .NET 1.0,
and .NET 1.0 didn't allow you to provide a calling convention, iirc.

(Or it was due to lack of UnmanagedFunctionPointerAttribute...)

The Gtk# build process has a post-processing step which patches the
assemblies so that things work as expected under .NET.

- Jon




More information about the Gtk-sharp-list mailing list