[Mono-list] Native Windows DLL from Mono?

Jonathan Pryor jonpryor at vt.edu
Thu Dec 13 18:29:01 EST 2007


On Thu, 2007-12-13 at 22:13 +0100, Johannes Graumann wrote:
> Can someone please let me know whether the old newsgroup articles concerning
> the impossibility to invoke native Windows dlls from within Mono running on
> a Linux box (e.g. through Wine) are still standing? Is there a way to do
> this?

The short version is that nothing has changed, and the newsgroup
articles are correct.

There's two ways to interpret "invoke native Windows dlls from within
Mono running on a Linux box":

1. A Linux ELF Mono program loading a PE Win32 DLL.  This is not
supported, and never will be supported, unless and until the Linux
dynamic loader supports PE files.  (This will probably never happen.)

2. A Linux ELF Wine program running a Windows PE Mono program.  This at
least has the possibility of working, as Mono would think that it's
running on Windows, not Linux.  There are still two problems with this:

 a. Mono currently doesn't run within Wine.  (At least, this is what 
    I've heard.)  I don't know why this is the case; you might try 
    asking the Wine developers what prevents Mono from running under it,
    as Mono runs on Windows...

 b. Mono couldn't load native Linux libraries.  Programs running within 
    Wine think they're running on Windows, and cannot load native Linux
    libraries, so an e.g. Gtk# Mono app running within Wine would be 
    using the Windows GTK+ libraries, not the Linux libraries, and thus
    would not use the same theme settings, etc.

 - Jon




More information about the Mono-list mailing list