I have an MFC application. It loads a DLL (DLL1). DLL1 in turn loads DLL2. DLL2 is used by DLL1 for resources. The problem is when I load DLL2 in DLL1, and call AfxSetResourceHandle(), this causes the resources in the application itself to be reset aswell.

How can I load resources into a DLL without affecting the resources of the application that loaded it? Both DLLs are MFC Extention DLLs.