Announcement

Collapse
No announcement yet.

DLL object

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

  • DLL object

    Anyone knows in what circumstances a DLL will be unloaded?
    For example, if I create a DLL object

    var twslnk = new DLL( "c:/windows/system32/twslink.dll" );

    whether this object be distroyed if I reload the EFS or the primary symbol in the chart is changed?

    Help is greatly appreciated.

    - Clearpicks

  • #2
    Hello Clearpicks,

    The unloading of a dll object is automatically handled by the application. There isn't anything you need to do in your EFS code as far as I know.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      How is the unloading done

      What if I would like to force an unloading of the DLL?
      There is no API for this in the DLL object.
      I would like to have some control over how the DLL is unloaded other than unloading my EFS script.

      Comment


      • #4
        Hello crazytiger,

        Currently, there isn't a method that will accomplish this. Please feel free to submit a request for this method to our development team at [email protected].
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          crazytiger,

          have you tried using:

          delete twslnk;

          That should destroy the dll object and may force an unload.

          Let us know if it works.

          Steve

          Comment


          • #6
            HI Steve,
            Where do I call this "delete twslink" from?
            Are you saying in the EFS, I call delete twslink, where twslink is the name of the var asssigned to the DLL object?

            I have had no success inside the DLL itself. I make some calls inside the DLL to make it have modeless dialogs and I have a call to init the AFXCOntainer.

            Any learning you can provide would be appreciated.

            Comment


            • #7
              crazytiger,

              In JavaScript the "delete" keyword is the opposite of "new".

              So if you do:
              var a = new DLL("myDll.dll");
              that will create a DLL object.

              Somewhere later in your efs code you could do:
              delete a;

              And that would destroy the DLL object, which in theory should unload it as well. Hopefully your DLL is coded to clean up any modeless dialog boxes when it unloads. Otherwise you could end up with memory leaks.

              I'm also trying to write a DLL in visual C++ to use a modeless dialog, but it crashes on the Create call. If you could post your code you used to create the modeless dialogs it may help me figure out what I'm doing wrong. If you don't want to post the code, could you PM me?

              Thanks,

              Steve

              Comment


              • #8
                Sorry. Steve. I just read your reply and noticed you wanted to see some sample code. If you were still having trouble, I would post it but I see you found an answer to your problem.

                I tend to go away for a long time and foreget to check back in so if you don't hear from me, it is not from indifference!

                I didn't know you could do a delete in the EFS engine. I will try that now.

                Comment


                • #9
                  I tried using delete.
                  It didn't make any difference.
                  When I unloaded my reference to a DLL object, esignal crashed whether I called delete prior to this or not.

                  Comment

                  Working...
                  X