What is the problem to create a new project (MFC Extension DLL), move all the files from your egular dll project to it and remove all the AFX_MANAGE_STATE macros?