If the DLL is already loaded, LoadLibrary
will simply return the address of the library in memory. However, DllMain
is not called again with DLL_PROCESS_ATTACH
when trying a second load. Pens in the sense of libraries are only memory cells, so the value you get the second time should be the same as the first.
As for linux SO files, I don't understand why they will be downloaded twice. However, someone else will have to weigh this to give you the correct answer.
source share