[Mono-list] PInvoke clarification

Miguel de Icaza miguel@ximian.com
09 Jul 2001 19:25:08 -0400


> The Runtime section of the site suggests that PInvoke will be supported, but
> the Classes section says, `The only drawback is that support for PInvoke of
> Win32 code wont be available'.  Does this just mean that you can't run Win32 
> code on Linux (duh) or what?

Yes, that is what this means.

We need to support PInvoke for example to write our own interfaces to
the existing libraries (ie, libc open()).

But if you copy an executable from Windows that uses PInvoke on a
Win32 call, we wont be able to make that call. 

On HWND: we will support handles, but those handles will be mapped to
whatever abstraction makes sense for us.  If you try to "work around"
System.Windows.Forms and talk to Win32 through PInvoke, you would find
two surprises:

	1. We dont support Win32 PInvoke calls (we might at some point
           with Wine.  Careful: at *some distant* point).

	2. The HWND is not a Windows handle, but something that just
           makes sense to the backing implementation of
           System.Windows.Forms. 

Miguel.