Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 General Discussion » ProfUIS library initialized two times Collapse All
Subject Author Date
Emmanuel Verguet Apr 19, 2007 - 6:12 AM

Hello,

I have a Prof-UIS application, using a dynamically linked Prof-UIS DLL. In thi DLL I have a dialog (resource + code). When lauching my application, in my trace I have two times "INITIALIZING DYNAMIC LIBRARY". And if I’m using a theme in my .exe, the dialog in my DLL does not use this theme. My DLL is an extension DLL.

Is it normal, or what is wrong ?

Thanks.

Emmanuel Verguet Apr 26, 2007 - 7:37 AM

Ok, I fix the problem. All my DLLs and my application (debug and release) were compiled using _MBCS, except ... my debug application where _MBCS was removed...

Thanks for your help.

Emmanuel Verguet Apr 26, 2007 - 7:06 AM

Ok, I will send you by email a screenshot of the stack, and checking what may be wrong...

Emmanuel Verguet Apr 23, 2007 - 1:09 AM

It’s an extension DLL (here are preprocessors definitions : _DEBUG,_WINDLL,_MBCS,MBCS,_AFXEXT,WIN32,_WINDOWS,_AFXDLL). Do you want stack informations ?

Technical Support Apr 23, 2007 - 9:59 AM

There must be only one copy of Prof-UIS used both from your EXE and extension DLL. It would be very interesting to take a look at the call stack. You can also send us only the project files (.vcproj or .dsp) of both your project and we try to find anything incorrect in their settings. In any case, Prof-UIS code produces compilation output when you are compiling your project. You can see equal automatically liked Prof-UIS library names in the compiler outputs of both projects. Additionally, if your MFC extension DLL is not statically referred from your EXE, then you should load it dynamically using the ::AfxLoadLibrary() API from MFC instead of the ::LoadLibrary() API from Win32 SDK.

Emmanuel Verguet Apr 20, 2007 - 12:50 AM

Not exactly, only one exe (using Prof-UIS), and one DLL (using Prof-UIS). I see two times "INITIALIZING DYNAMIC LIBRARY", and dialog in my DLL does not use the same theme than in my EXE.

May be its normal... Do I need to add a InstallPaintManager in my DLL (and where) ?

Technical Support Apr 20, 2007 - 8:37 AM

Please let us know exactly if your DLL is MFC regular DLL or MFC extension DLL? If it is regular, then it has one global theApp variable of CWinApp-derived type and it should use an RDE version of Prof-UIS. In this case you will have two copies of Prof-UIS loaded into the running process. If your DLL is MFC extension, then both EXE and your DLL should use the same one copy of Prof-UIS.

Technical Support Apr 19, 2007 - 12:26 PM

Please let us know if it is what you actually mean: you have one EXE and two MFC extension DLLs, one is Prof-UIS’s and second is yours. In this case you should not see double messages. Please set a breakpoint in the DllMain() function in Prof-UIS, capture the content of the Call Stack window two times and send it to us.