corman-DLL from .NET?
"hpwickern" <[email protected]> Mon, 02 Jun 2003 17:26:44 -0000
| Newsgroups | gmane.lisp.corman |
|---|---|
| Message-ID | <[email protected]> |
I have the following sample-DLL code, which works fine when called from a delphi-enviroment. Now I want to try it from a .NET-enviroment where I import the DLL as unmanaged code. (ct:defun-dll-export-c-function (hpwtest "testlisp") ((str (:char *))) "char* testlisp()" (let ((test nil))) (if (setq test(ignore-errors(eval(read-from-string (ct:c- string-to-lisp-string str))))) (ct:lisp-string-to-c-string test) (ct:lisp-string-to-c-string "ERROR"))) I called it first by sending this string: (setq a "Test1" b "Test2" c "Test3") In the second and all subsequent calls I send this string: (concatenate 'string (eval a)" "(eval b)" "(eval c)) In .NET it works fine for 10-20 calls then I get an error: System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. Has anyone successfully called DLL from .NET? Hans-Peter ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/SyjtlB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/