Announcement

Collapse
No announcement yet.

Calling VB-Dll

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling VB-Dll

    I made a test dll with VB. It contains one function:

    Public Function Add(Value1 As Double, Value2 As Double) As Double
    On Error Resume Next

    Add = Value1 + Value2

    End Function

    in Class-Module called clsCalculate.
    Instancing is 5= Multiuse

    I try to call this dll from within a EFS like this:

    var d = new DLL("K:/Visual-Prog/eSignal/DLL-Test/TestDll.dll");


    function preMain() {
    d.addFunction("Test", DLL.DOUBLE, DLL.STDCALL ,"Add", DLL.DOUBLE, DLL.DOUBLE);

    }

    function main() {

    var v = d.call("Test", 4, 5); // This is line 18
    debugPrintln("v = " + v + "\n");
    }

    The following error occurs:
    line 18: Internal Error: ... Fumction(Add) was not found

    What do I need to change, to call this dll?

    Traveller

  • #2
    Traveller:

    I'm no expert in VB (I use Delphi) but it has been my understanding that you cannot create 'regular' DLLs using VB. Take a look at the the following link on that subject:

    http://www.visualbasicforum.com/t136694.html

    Chris

    Comment


    • #3
      Traveller:

      Here is a link to a company that appears to have a solution to that issue:

      http://simplysolutions.com/visdll/detail.html

      Hope this helps.

      Chris

      Comment


      • #4
        Calling VB-Dll

        Thanks ckryza,

        I'll take a look on that.

        Traveller

        Comment

        Working...
        X