I have a DLL which contains two exported functions Function1 and Function2, they will access the global variables defined in the DLL.
Now if:
In my application MyApp.exe, I will load the DLL either explicitly or implicitly.
Then MyApp.exe will call Function1 to save some data in the global variables in the DLL.
Then MyApp.exe will prompt the user to do some tasks. During this period, will the global variables in the DLL still persist in the memory, or will the DLL be unloaded because the Function1 is completed?
Then MyApp.exe will call Function2 which will use the data saved in global variables by Function1 in step 2, so I hope the data are still available.
Then MyApp.exe will unload the DLL.
So, my question is, if a DLL function is completed, will the data it saved in global variables of the DLL still persist in memory and available for future usage?
Thanks