[Mono-winforms-list] Caret

Sebastien Pouliot sebastien at ximian.com
Fri Mar 9 09:55:13 EST 2007


Hello Rafael,

On Fri, 2007-03-09 at 11:28 -0300, Rafael Teixeira wrote:
> Hi George,
> 
> Interesting idea, but that kind of redirection isn't presently possible.
> 
> Mono has some logic on mapping p/invoke calls (using .config files
> even for dlls) but AFAIK it is just to point to some other native
> library and function entry-point, still doing the marshaling of things
> as needed for the native platform.
> 
> Just extending it to allow mapping to managed implementations would
> still put the burden of creating the mapping .config files/sections
> for porting devs, or packagers.
> 
> A middle ground solution would be to either hardcode the mapping
> inside the runtime (a magic xml file, for instance), or allow for some
> "exporting" configuration section on .config (or some managed API) to
> add the mapping by the API providing assembly, but this latest
> suggestion seems risky, security-wise, because it could allow any
> assembly to "sequestrate" some native API, 

For replacing p/invokes this is of little, if no, consequence. Remember
that once you're using them all (security) bets are off ;-)

> even more as full CAS and
> trust-management isn't working on Mono

Again not a real problem as calling p/invoke requires UnmanagedCode
permission which is basically equivalent to FullTrust (what CAS-less
Mono provides today).

> Discussion on risks, benefits, and also code contributions to test the
> premises are all welcome.

and that's by no mean an end to the discussions/contributions ;-)

Sebastien

> 
> :)
> 
> On 3/9/07, George Giolfan <georgegiolfan at yahoo.com> wrote:
> > If you mean implementing such functions in native code
> > is wrong, I completely agree. I was suggesting we
> > could implement Win32 functions (those that do not
> > have managed equivalents) in managed code and have
> > Mono call them when it encounters a P/Invoke (I am
> > under the impression that this is possible). This way
> > we wouldn't need to change every program we want to
> > port. There are already methods in XplatUI very
> > similar to the caret Win32 functions.
> >
> > --- Rafael Teixeira <monoman at gmail.com> wrote:
> >
> > > Having a libuser32.so, and possibly others, to
> > > enable all that
> > > p/invoking seems a bit too much for me.
> > >
> > > We should strive to keep all we can in managed-land,
> > > where things are
> > > naturally more portable.
> > >
> > > Just my thinking on the subject,
> > >
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Don't get soaked.  Take a quick peek at the forecast
> > with the Yahoo! Search weather shortcut.
> > http://tools.search.yahoo.com/shortcuts/#loc_weather
> > _______________________________________________
> > Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> >
> 
> 
-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/



More information about the Mono-winforms-list mailing list