Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Multiple MFC Dlls Collapse All
Subject Author Date
Jon Ort Oct 2, 2009 - 3:56 PM

We are moving a large MFC product to Prof-UIS 2.84.

We have a project that has the following structure:




The EXE links to MFC regular DLL1 and MFC regular DLL2. as well as the standard Prof-UIS libraries ProfUIS284md.dll

The DLLs use CExt_ProfUIS_ModuleState::InitExtension( ::AfxGetStaticModuleState() ); in their InitInstance as well as define __PROF_UIS_FOR_REGULAR_DLL so they link to ProfUIS284md-RDE.dll

The problem appears to be that g_pExternalModuleState is a singleton and when DLL2 get initialized it resets the state for any calls from DLL1.  Any DoModal calls from DLL1 try to locate the resources from Dll2.

Is there a way to get the automatic state management in Prof-UIS to handle this or is there a way to manually manage the Prof-UIS state?


Jon Ort

Technical Support Oct 5, 2009 - 8:06 AM

There are only two solutions available:

1) Good solution. Link your regular DLLs with Prof-UIS RDE library statically. I.e. you should use static RDE version of Prof-UIS.

2) Bad solution. Create several copies of Prof-UIS RDE library as DLL. All the copies must have different names.