This doesn't necessarily always work because you don't know if the application that is using the DLL is using MFC or not. If you have source to both the EXE and the DLL, then you should provide a function in the DLL that allows the EXE to pass in the CWinApp pointer as a parameter.

0

DanielJenkinsAuthor Commented: 1998-12-27

I don't know what applications will be using this DLL, it could be a Visual Basic App or a Visual C++ App.