[Mono-winforms-list] Porting application that calls windows andother DLLs
Roderick Colenbrander
thunderbird2k at gmx.net
Thu Dec 18 18:53:20 EST 2008
The way we recommend in case of Wine (I'm a Wine dev) is to use the win32 version of mono on Wine and run your app that way. Then you should be able to pinvoke win32 dlls if win32 mono allows that which I believe it can. Note that a lot of apps also try to mix windows.forms with legacy gdi32/user32 calls which won't work due to the managed windows.forms implementation.
Roderick
> Correct. Once in a while I see some emails about Wine and such but I
> don't recall anyone ever saying that they've gotten it to work; mostly it's
> once in a while that someone asks if it *can* work and pretty much the
> situation is "if you have to ask - then you don't know near enough to ever get
> it working."
>
>
> -----Original Message-----
> From: Matthew Donaldson [mailto:matthew at datadeliverance.com]
> Sent: Thursday, December 18, 2008 4:20 PM
> To: mono-winforms-list at lists.ximian.com; Maser, Dan
> Subject: RE: [Mono-winforms-list] Porting application that calls windows
> andother DLLs
>
> Thanks, that's encouraging news. But you definitely have to compile the
> DLLs for Linux don't you - I'm right in assuming that pinvoke on Mono won't
> call into native Windows DLLs?
>
> +--------------------------------------------------------------------------+
> | Matthew Donaldson http://www.datadeliverance.com
> |
> | Data Deliverance Pty. Ltd. Email: matthew at datadeliverance.com
> |
> | 30 Musgrave Ave. Phone: +61 8 8265 7976 _
> |
> | Banksia Park Fax: +61 8 8265 0032 John / \/
> |
> | South Australia 5091 3:16 \_/\
> |
> +--------------------------------------------------------------------------+
>
>
>
> On Fri 19/12/08 1:07 AM , "Maser, Dan" Dan.Maser at inin.com sent:
> > In my mono application I have PInvokes that run on both Windows and
> Linux
> > and in my experience it works and you don't even have to change the
> source
> > code from ".dll" to ".so". If you put the module name
> > only in the source code then the right thing happens. The MS.NET knowns
> to
> > append ".dll" when looking for the file and Mono knows to try
> > both ".dll" and ".so" when running on Linux.
> > Additionally, I think there's something about an xml file you can put in
> > the same directory as your assembly that acts as a mapping where you can
> > tell mono "when looking for foo.dll you should try bar.so" that
> > you can use if you don't want the Windows and Linux libraries to have
> the
> > same name.
> > Of course you have to pay close attention to using the correct
> decorations
> > for calling conventions on both libraries.
> >
> > -----Original Message-----
> > From: mono-winforms-list-bounces at lists.ximian.com
> [mono-winforms-list-bounces at lists.ximian.com] On Behalf
> > Of mcgdSent: Thursday, December 18, 2008 5:42 AM
> > To: mono-winforms-list at lists.ximian.comSubject: [Mono-winforms-list]
> Porting application that calls windows and
> > other DLLs
> >
> > Hi,
> >
> > I've been asked to try and get a .NET 1.1 application working under
> Mono.
> > It makes quite a few Windows API calls, but also calls several other
> > DLLsusing PInvoke. Most of these DLLs can probably be recompiled under
> > Linux,but probably not all.
> >
> > >From looking around, it seems that it's not
> > possible to call Windows DLLsvia PInvoke using Mono, but I wanted to
> make sure this is the case.
> > Someonementioned something called "ctypes" as a way of doing this, but
> > this seemsto be a Python thing.
> >
> > I'd appreciate input on what my options might be available here, and
> > whetherit's worth trying to go further. A few other specific questions
> -
> > answersor URLs appreciated:
> >
> > - Is there any way at all to get the equivalent of calls into
> User32.dll?
> > Most of these are in User32.dll. The application is very
> > GUI-intensive.
> > - Is it possible to use Wine to run the DLLs? I've seen references to
> > thisidea, but I don't think I've found anything concrete.
> >
> > - If the other DLLs could be recompiled into .so files under Linux, can
> > Iuse PInvoke without changing anything except ".dll" into
> > ".so", or doparameter names and types need to be changed too? (i.e.
> would this
> > possiblybe a significant porting effort in its own right?)
> > --
> > View this message in context:
> http://www.nabble.com/Porting-application-that-calls-windows-an
> > d-other-DLLs-tp21071161p21071161.htmlSent from the Mono - WinForms
> mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > Mono-winforms-list maillist -
> Mono-winforms-list at lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-winforms-list
> >
> >
> >
> >
> ---- Message sent via Adam Internet WebMail - http://www.adam.com.au/
>
> _______________________________________________
> Mono-winforms-list maillist - Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
More information about the Mono-winforms-list
mailing list