Custom DLL fire all methods in sequence as soon as it initiate

spiky_goldenspiky_golden Member Posts: 44
Hey guys,
We try to make a custom dll with multiple method in it. But as soon as the variable is initiated it fires all the code Inside the DLL then it goes for the NAV code... It's kind of useless this way... Do you know what we did wrong?
Patrick Venner
programmeur-analyste
Cabico Custom Cabinetry

Answers

  • kylehardinkylehardin Member Posts: 257
    Sounds like someone grouped all of the actual code in the DLL into the main program, rather than just exposing methods (functions) that NAV can call when it wants to. In c#, that means the code is in the static void Main(string[] args) part instead of being in publicly exposed functions like public void PopulateShipToAddresses().
    Kyle Hardin - ArcherPoint
  • spiky_goldenspiky_golden Member Posts: 44
    Here is a basic sample that does exactly the same thing ( it's a vb.NET Dll)

    '/*******
    Imports System.Windows.Forms

    Public Class TestTransfer

    Public Sub New()
    End Sub

    Public Sub Transfer1()
    MsgBox("1")
    End Sub

    Public Sub Transfer2()
    MsgBox("2")
    End Sub

    End Class
    Patrick Venner
    programmeur-analyste
    Cabico Custom Cabinetry
Sign In or Register to comment.