[Mono-devel-list] Global dllmap entries?

Paolo Molaro lupus at ximian.com
Mon Apr 11 08:51:52 EDT 2005

On 04/08/05 Miguel de Icaza wrote:
>     I would like to have a `global-dllmap' entry on our .config files so
> that it is possible to register standard mappings by libraries.  Today
> we have something like that in the form of $mono/etc/mono/config, but
> there is no way for a binding library to provide these.
>     The issue at hand is that gtk-sharp ships with a config file that
> maps the libgtk-win32-etc.dll name to the proper name on the underlying
> OS.  And I would like third party apps to be able to consume this
> binding as opposed to introducing the logic on every application that
> needs to bind an API from Gtk+ that might not be bound.

I don't like the fact that an assembly would push in the global space
some dllmappings, because it would be indiscriminate: every app wuld get
them even if they are not interested and it's not clear what kind of 
ordering is applied to the mappings.
An alternative way to provide the same functionality with sane
semantics could be to have a new config directive in the
assemblies that want to reuse the mappings from other assemblies.

		<dllmap reference="gtk-sharp" />

Suggestions for better names than 'reference' are welcome.
This would allow the apps that need the dllmaps to reference
other assemblies by name (it could eventually also use a full
assembly name, with version and pubtoken) explicitly but in
a pain-less way.
And we wouldn't pollute the global dllmap space.
The 'reference' dllmapping would be tried after the local explicit
dllmaps and before the global ones, allowing an easy override.


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list