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.
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.
Comment