[Mono-devel-list] Global dllmap entries?

Jonathan Pryor jonpryor at vt.edu
Sat Apr 9 17:32:17 EDT 2005


On Sat, 2005-04-09 at 13:18 -0500, Mike Kestner wrote:
> The situation as it stands now is that we not only have platform
> specific glue, but we also have a build hack in place to dasm/hack/asm
> the assemblies on win32 for the cdecl calling convention thing.  The
> dllmap .config hack is a throwback to the good old days when we thought
> we could have "build-once-run-everywhere" deployment for Gtk#, but based
> on current knowledge I don't believe such a goal is attainable.

Such a goal is attainable, you just need to set your requirements
higher. :-)

In particular, .NET 2.0 has an UnmanagedFunctionPointer attribute which
can be used to specify the calling convention of delegates passed to
native code.  This (I hope) would allow you to achieve your goal of
having identical assemblies for all platforms, as .NET would allow you
to interop with GTK+ without issue.

The downside to this is requiring .NET 2.0, so it may not be a
satisfactory solution.

See (beware line wrapping):
http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpref/winfx/ref/ns/system.runtime.interopservices/c/unmanagedfunctionpointerattribute/unmanagedfunctionpointerattribute.asp

 - Jon





More information about the Mono-devel-list mailing list