Author Topic: netload dll with arguments  (Read 2509 times)

0 Members and 1 Guest are viewing this topic.

Peter Guappa

  • Guest
netload dll with arguments
« on: November 06, 2011, 02:10:32 PM »
I want to know how to use netload with arguments to pass to a dll, and get the results from the dll back to lisp.
Could somebody help me a little example?


lisp:
(defun C:test (a b c)
  (setq a (getint)
        b (getint))

  // (setq c (+ a b)) - I want to use a dll here, only to excercise working with dll, and to learn the interaction between lisp and VB.net with netload !!!!
  // So I want to calculate 'c' with a dll and send the result back to Lisp.
  // netload dll with arguments HERE

  (princ (strcat "\nresult =" (itoa c)))
  (princ)
  );defun
(princ)



VB dll - What do I have to add in my dll to get the arguments passed by lisp/netload

Imports System.Runtime.InteropServices
Imports System.Security.Permissions.SecurityPermission
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Public Class Class1
    Dim a As Integer
    Dim b As Integer
    Dim c As Integer = a + b
End Class

How do I get var c back to lisp?

Thx

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: netload dll with arguments
« Reply #1 on: November 06, 2011, 02:55:58 PM »
The ResultBuffer is the mechanism you use.

A search here ( and elsewhere) will give you some ideas.
http://www.theswamp.org/index.php?topic=35714.msg409451#msg409451
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Peter Guappa

  • Guest
Re: netload dll with arguments
« Reply #2 on: November 06, 2011, 07:31:00 PM »
Thx. It works.

The ResultBuffer is the mechanism you use.

A search here ( and elsewhere) will give you some ideas.
http://www.theswamp.org/index.php?topic=35714.msg409451#msg409451