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 | [email protected]

Interactive Intelligence Inc.
Deliberately Innovative
www.inin.com


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jason.Jenkinson
Sent: Wednesday, October 14, 2009 9:35 AM
To: [email protected]
Subject: [Mono-list] user32.dll & gdi32.dll


Hi,

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)
errors.

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.

Jason
-- 
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  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list


_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to