[rdnzl-devel] Re: loading an assembly in clisp 2.42

Matthew D Swank akopa.gmane.poster at gmail.com
Sat Oct 20 23:54:48 UTC 2007


On Sat, 20 Oct 2007 16:54:55 +0200, Edi Weitz wrote:

> 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.
> 

Thanks, all those suggestions worked.

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

Well, I am constrained to use clisp or sbcl.  I plan on getting around
the callback issue by running the gui in a separtate .NET thread and
running and event loop on the lisp side to listen to .NET events over a
set of synchronized channels.

Btw, it needs a little cleanup, but I've updated the VS 2005 version of
the cpp project to conform to the 0.6.0 protocol.  Would you like a copy
of it when I have it ready?

Matt

-- 
"You do not really understand something unless you
 can explain it to your grandmother." — Albert Einstein.





More information about the rdnzl-devel mailing list