By looking at the included libraries, it seems that your DLL is using MFC, linked statically. You cannot, and I repeat, cannot use DllMain as the DLL entry point when using MFC. Instead, I suggest you create a whole new DLL project, this time by using the MFC DLL Wizard which comes with Visual Studio. It creates a skeleton project for you, indicating places where you should add code by inserting comments. As for the other errors, it seems that your linker input libraries are missing something. For a general rule of thumb, create a new project and copy/paste relevant code over the new skeleton. The reason why you cannot use DllMain is because MFC already offers this function in it's core libraries. This is, by Microsoft's words: "Behaviour by design". MFC's DllMain will query for an external CWinApp object, which is exported by the main code module of your project (Usually defined as C<Project name>App theApp). It will then call the InitInstance function of your class to start the DLL's execution. So, all in all, create a new project by using the MFC DLL Wizard. This will solve 99% of the problems you listed, although moving the code from the current project into the new skeleton project may be quite difficult. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.