[Mono-list] user32.dll & gdi32.dll
Dan.Maser at inin.com
Wed Oct 14 10:36:46 EDT 2009
You can't do it that way. As implied by the "Native" name - they are native to the OS you're running on. So you can't make native windows calls on a linux machine. You have a few choices
1. You can re-write your managed code to not need the native calls, hence making your app portable
2. You can make a thin abstraction layer and provide a windows DLL (or use user32/gdi32/etc) and provide a linux shared library. I do this for several situations where managed code is not sufficient.
3. If your feature is not too important, like often is the case with native Windows calls for just eye candy, you can surround the feature with checks to see what platform you're running on so that Windows code is not invoked from linux.
Dan Maser | Lead Software Developer
phone & fax +1.317.872.3000 | mobile +1.317.872.3000 | dan.maser at inin.com
Interactive Intelligence Inc.
From: mono-list-bounces at lists.ximian.com [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Jason.Jenkinson
Sent: Wednesday, October 14, 2009 9:35 AM
To: mono-list at lists.ximian.com
Subject: [Mono-list] user32.dll & gdi32.dll
I have searched for a while on this and I have read multiple posts regarding
the DLLImport of the user32.dll, however I am new to Linux and I cannot seem
to get this issue sorted. I also have the same issue with the gdi32.dll.
Basically I have a Native.cs file with all the dllimports but when I compile
and run the exe through mono I receive multiple .Native:GetParent (IntPtr)
I would appreciate any pointers that you could give me as I would like to
continue to get the windows apps ported onto a linux platform and move away
from the windows society.
View this message in context: http://www.nabble.com/user32.dll---gdi32.dll-tp25892249p25892249.html
Sent from the Mono - General mailing list archive at Nabble.com.
Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list