"I have a program that duplicates a dll and loads it multiple times." What ???
Do you copy the DLL and then call LoadLibrary ?
The same dll would not be loaded several times by the same Process.
"For each DLL that has not already been called, the system calls the DLL's entry-point function.
This call is made in the context of the thread that caused the process address space to change,
such as the primary thread of the process or the thread that called LoadLibrary.
Threads in DllMain hold the loader lock so no additional DLLs can be dynamically loaded or initialized."
If the Problem occurs after loading the same DLL several times with LoadLibrary() something
must go wrong inside your DLL.
What does the DLL do and why are you loading it several times ?