[rdnzl-devel] loading an assembly in clisp 2.42

Edi Weitz edi at agharta.de
Sat Oct 20 14:54:55 UTC 2007


On Sat, 20 Oct 2007 05:05:05 +0000 (UTC), Matthew Swank <akopa.gmane.poster at gmail.com> wrote:

> I have a library written in C# -- Foo.dll.  I am able to load rdnzl
> in clisp, and run simple examples that involve importing registered
> libs: "Hello World!", etc. No matter where I put Foo.dll,
> (load-assembly "Foo") results in:
>
> WARNING: Returning NULL object from .NET call
> NIL

You should succeed if you put Foo.dll in the folder where your CLISP
executable is (/before/ you start CLISP).

> When I specify a full path: 
> (load-assembly "c:\\Documents and Settings\\user\\Desktop\\Foo.dll")
>
> I get:
>
> *** - .NET error (System.IO.FileLoadException): The given assembly name or
>       codebase was invalid. (Exception from HRESULT: 0x80131047)

LOAD-ASSEMBLY uses System.Reflection.Assembly::LoadWithPartialName
internally - that one doesn't work with full pathnames.

> I'm not sure what to do at this point.

  (rdnzl:invoke "System.Reflection.Assembly" "LoadFrom"
                "c:\\Documents and Settings\\user\\Desktop\\Foo.dll")

should give you the assembly.

HTH,
Edi.

PS: See the notes in the documentation about CLISP.  You should try
    one of the Lisps that are fully supported instead.



More information about the rdnzl-devel mailing list