[Mono-devel-list] Can I use Microsoft's DLL's on the Win32 platform?
Pete Gonzalez
pgonzalez at bluel.com
Mon Apr 25 15:17:07 EDT 2005
Hello,
I am just getting started with Mono on Windows XP. I built a very simple
HelloWorld.exe using Visual Studio, then I clicked on the "Mono-1.1.6
Command Prompt" and typed "mono HelloWorld". When my form appeared, the
GUI did not look quite right, which is a little surprising since it's just
an empty dialog box with a button. :-)
The Mono Windows.Forms implementation obviously is still "under
construction," but since my target platform is Windows XP, I can just use
the real Microsoft libraries. So I tracked down all the referenced
Microsoft DLL's and copied them to the same folder as HelloWorld.exe, so
that Mono will load them instead of its custom versions. However, now my
application crashes with an exception:
> Unhandled Exception: System.NotImplementedException: The
> requested feature is not implemented.
> in <0x00021> Microsoft.Win32.SystemEvents:add_UserPreferenceChanging
> (Microsoft.Win32.UserPreferenceChangingEventHandler value)
> in <0x0004e> System.Drawing.KnownColorTable:InitColorTable ()
> in <0x00010> System.Drawing.KnownColorTable:EnsureColorTable ()
> in <0x00007> System.Drawing.KnownColorTable:KnownColorToArgb
> (KnownColor color)
> in <0x0003c> System.Drawing.Color:get_Value ()
I read the FAQ's, but apparently using Microsoft DLL's has never occurred
to anyone? It seems to me that, as long Mono's MSIL virtual machine and
pinvoke support are there, mono.exe should work as a drop-in replacement
for Microsoft's virtual machine (regardless of how incomplete Mono's .NET
Framework is). Moreover, it seems that this would be a quite simple
challenge compared to implementing a full C# compiler or Windows.Forms
replacement. So -- has anyone asked about this? Does it work?
My hope is to use kick-ass Mono features (such as the SSA optimizations,
"--aot", "mkbundle", etc.) with standard Visual Studio projects, which
you'd think would be very attractive. More importantly, Win32 offers a
vast array of libraries that may be unsupported by Mono for a long time, so
in a sense, this is a mandatory requirement for Win32 developers who aren't
hindered by portability concerns.
Cheers,
-Pete
More information about the Mono-devel-list
mailing list