[Mono-devel-list] Pinvoke + Win32 API

Jonathan Pryor jonpryor at vt.edu
Thu Nov 11 19:09:19 EST 2004


On Thu, 2004-11-11 at 22:44 +0000, Angel Todorov wrote:
> Is it possible to import Windows DLLs (for example, any DLL residing
> in <windows>\System32\) in mono (Linux) projects?

No.  Unix and Windows have very different paradigms for shared libraries
(_init/_fini vs. DllOpen and associated semantics, dependent libraries
such as kernel32.dll, object formats, etc.).  You'd have to use Wine to
do this, and currently Mono and Wine don't integrate together.  (This
will be worked on to some extent for System.Windows.Forms support, but
it can't work miracles.)

Furthermore, using the Windows crypt32.dll on Linux probably isn't
legal.  You'd have to check the license agreement to be sure, but it's
fairly probable that Microsoft only permits Windows-integrated DLLs to
be used on Windows.

 - Jon





More information about the Mono-devel-list mailing list