In case it's interesting or useful, I've attached some p/Invoke stuff I was
playing with before I got derailed by the DefineDynamicAssembly problem and
then joined Microsoft :).

On Sat, Mar 21, 2009 at 10:45 AM, Dino Viehland <[email protected]> wrote:

> If you only have 1 method and don't need overload resolution I'd suggest
> making a delegate using System.Delegate.CreateDelegate.   Otherwise this
> could be made public.
>
> > -----Original Message-----
> > From: [email protected] [mailto:users-
> > [email protected]] On Behalf Of Jeff Hardy
> > Sent: Saturday, March 21, 2009 9:44 AM
> > To: Discussion of IronPython
> > Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython
> > 2.6
> >
> > Thanks Curt, that worked. Now I have a new problem - I can get a
> > MethodInfo, but I need to be able to convert it to something I can
> > call. Seo's old code used BuiltinFunction.MakeOrAdd, but that is now
> > internal. Can this be made public, or is there a better way to handle
> > it?
> >
> > - Jeff
> >
> > 2009/3/20 Curt Hagenlocher <[email protected]>:
> > > I think this is something that broke well before the 2.0 release.  To
> > work
> > > around it in pyc.py, we added DefineDynamicAssembly to the PythonOps
> > class
> > > in IronPython:
> > >
> > > import clr
> > > clr.AddReference('IronPython')
> > > from IronPython.Runtime.Operations import PythonOps
> > > assemblyBuilder = PythonOps.DefineDynamicAssembly(...)
> > >
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>

Attachment: pinvoke.py
Description: Binary data

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to