[Mono-list] SWF Programming Question

Eric Lloyd ewlloyd@neta.com
Fri, 20 Sep 2002 15:38:24 -0700


Oren,

I'm in the process of developing an application in VB and C# that uses no 
P/Invokes whatsoever. I haven't run into any places where it's truly 
necessary. Frankly, I don't have a lot of sympathy for developers who go 
under the hood and break portability for the sake of eyecandy.

What sort of P/Invokes are people using that actually provide needed 
functionality? Perhaps the solution is to provide the .NET developer 
community with encapsulations for the most common P/Invoke calls, so we can 
restore some portability.

If they even begin to care about running on Mono (they will, soon enough), 
they'll use our compatibility layer. If they need a Win32 call that we 
haven't covered, they can create their own encapsulation over it and submit 
it to the project. Their alternative is to cut off a significant share of 
their potential market.

In the case of the toolbar, for example, somebody could write a 
"Windows.Forms.SuperToolbar" object that would provide those features you 
need. Publish it widely, or in a central repository, and that's one less 
P/Invoke that's needed by end developers.

Cheers!
Eric

>From: "Oren Novotny" <osn@po.cwru.edu>
>To: <mono-list@ximian.com>
>Subject: RE: [Mono-list] SWF Programming Question
>Date: Fri, 20 Sep 2002 12:51:50 -0400
>charset="iso-8859-7"
>
>Miguel,
>
>If P/Invoke of the Win32 functions is not supported, then I think that
>Mono's SWF implementation will be, for all intents and purposes,
>useless.  I have not yet seen a single, less than trivial, .Net Windows
>application that did not use several P/Invoke's to the Win32 libraries.
>
>I'd understand not supporting P/Invoke into 3rd party libraries, since
>you'd need to translate those.  But I'd think that at least the Win32
>DLL's should be supported since most applications already use them.
>
>For example, anyone who is using a toolbar or menu control, other than
>the included one, is relying on the ComCtrl32.dll library, among others.
>Since the built-in toolbar and menu controls are pretty fugly and
>feature-lacking, most people have chosen to use some other menu/toolbar
>library.  Likewise, many applications make calls to set an XP Theme on
>certain controls that the .manifest trick isn't enough for.
>
>In the end, if Mono's SWF implementation doesn't take all of those
>P/Invoke's into account, then I don't think that many people will be
>able to use it since their apps have external dependencies.
>
>I hope that you reconsider.
>
>Regards,
>
>--Oren