[rdnzl-devel] LoadWithPartialName vs Load

Edi Weitz edi at agharta.de
Mon Nov 9 21:16:57 UTC 2009


Hi Raymond,

I have to admit that I rarely, if ever, used RDNZL myself.  I started
writing it for fun and only finished it because I gave a talk about
it.  At that time I was ambitious enough to bring it into a usable
state, but as I didn't have any serious projects relying on it, I
didn't keep track with .NET development and I'm sure it's out of tune
now.

If you have changes to make RDNZL better, I'm happy to accept patches,
but I won't be able to test or evaluate them due to lack of time.
I'll simply pack them into a new release if they follow the usual
patch guidelines:

  http://weitz.de/patches.html

Thanks,
Edi.


On Mon, Nov 9, 2009 at 9:36 AM, Raymond Wiker <rwiker at gmail.com> wrote:
> Hi,
> I'm trying to use rdnzl to interface with certain .NET libraries.
> These libraries have a callback mechanism that requires me to subclass
> a C# class (or implement a C# interface) with two specific methods. I
> haven't seen any mention that RDNZL can be used to subclass C# classes
> (which I guess would be non-trivial to do), so I'm guessing that I
> need to write a C# wrapper class for interfacing with Lisp.
>
> I'm having certain problems with this, probably caused by some .NET
> details that I haven't (yet) understood. As part of unravelling this,
> I've discovered that import-assembly calls load-assembly and that a
> failure in load-assembly will cause a null assembly to be returned,
> from which import-assembly will import exactly zero items. In other
> words, any errors from load-assembly will not be signalled until
> later.
>
> The MS documentation states that LoadWithPartialName (as used by
> load-assembly) is an obsolete call, and that that
> System.Reflection.Assembly.Load() should be used instead. Load() can
> even be used with partial names, like this:
>
> (defun load-assembly-2 (name)
>  (let ((fullname (new "System.Reflection.AssemblyName")))
>    (setf [%Name fullname] name)
>    [System.Reflection.Assembly.Load fullname]))
>
> I've just tried this, and load-assembly-2 gives an exception which is
> transferred perfectly through RDNZL in cases where load-assembly
> returns null.
>
> Regards,
> Raymond Wiker
>
> _______________________________________________
> rdnzl-devel mailing list
> rdnzl-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-devel
>
>




More information about the rdnzl-devel mailing list