Announcement

Collapse
No announcement yet.

Is DLL Object data unshared?

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

  • Is DLL Object data unshared?

    If I have 2 EFS files which load the same DLL Object (i.e., same DLL file), will the global data within the DLL be shared?

    My preliminary tests are showing that the answer is no.

    The way I tested this was to create a global variable in the DLL. Then, every time the dllMain() function was called, I incremented a global variable by 1. I was expecting each invocation of "new DLL(...)" to bump the global variable up by 1, but it stayed at 1 which leads me to believe that none of the global or static data within a DLL is ever shared between different EFS script loadings of the DLL file.

    I'm assuming though that code sharing is going on so each call of "new DLL(...)" doesn't add another copy of DLL's machine code into the winsig.exe address space.

    Are both of my assumptions correct?

    Thanks.

  • #2
    Hello Steve,

    You are correct. Each EFS that creates an object of the dll through the EFS DLL() method receives it's own instance of the dll. The data maintained in the dll for each formula is not shared with another formula that may be using the same dll.
    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

    Working...
    X