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 Tech Support » Dialogs not working via DLL Collapse All
Subject Author Date
Robert Webb Oct 1, 2009 - 2:00 AM

Part of our program is implemented in a DLL.  Both this DLL and the main EXE do ProfUIS interface stuff, but we get a few problems when doing ProfUIS stuff from the DLL.


One problem is that if we derive our dialog from CExtNCW <CExtResizableDialog> instead of CDialog and call CExtNCW <CExtResizableDialog>::Create(id, parent) it fails to find the resource with the given ID.  If we use CDialog instead then it works fine.  Any thoughts about this?


Thanks,


Rob.

Technical Support Oct 1, 2009 - 12:45 PM

Please provide us with a couple of very important details:

- Whether your DLL is regular or extension type?

- Which configurations of Prof-UIS are used in your EXE and DLL projects?

If your DLL is regular, you should use RDE version of Prof-UIS in it.
If your DLL is extension, then please check whether the resource identifiers of your DLL are not intersected with EXE resource identifiers and with Prof-UIS 29000...31000 range of identifiers too.

Robert Webb Oct 2, 2009 - 1:55 AM

Hmm, that might be the problem.  I believe ours is a regular DLL, but I link it to the same non-RDE ProfUIS DLL as our main exe.  I don’t really understand why they both need to use different configurations of the ProfUIS library.  Seems a pity to have to include the same library twice.


Anyway, I’m now trying to compile our DLL against the RDE ProfUIS DLL instead, but have an interesting problem.  Here’s some of the output:



3>TypeManager.cpp
3>   Automatically linking with Prof-UIS library: ProfUIS287nd-RDE.lib
3>	  (Professional User Interface Suite)
3>Generating Code...
3>Linking...
3>LINK : fatal error LNK1104: cannot open file ’ProfUIS283nd-RDE.lib’


But why is it trying to link to version 2.8.3 at the end??  All along it says it is automatically linking to 2.8.7, then right at the end it complains about the 2.8.3 library not being available.  I searched through our code and project files and there doesn’t seem to be anything explicitly linking in 283.  I can’t find anything in ProfUIS to cause this either.  Have you seen this before?  Any suggestions?


Thanks,


Rob.

Technical Support Oct 2, 2009 - 1:58 PM

You should compile the ANSI Debug RDE configuration of the ProfUISDLL project first.
Please also read this:
http://www.prof-uis.com/prof-uis/tech-support/faq/miscellaneous.aspx#how-to-use-prof-uis-in-my-dll-project

Robert Webb Oct 2, 2009 - 2:35 AM

I should add that when I was linking with the non-RDE version (ie when I didn’t have __PROF_UIS_FOR_REGULAR_DLL defined) it all compiled and ran fine (didn’t try to link with any old 283 version files).  Does it makes sense that it used to link and run without problems for the most part if I was linking the non-RDE version into our regular DLL?


I tried copying ProfUIS287nd-RDE.lib to ProfUIS283nd-RDE.lib just to see what happened, and sure enough it compiled happily, although really, why is it looking for 283??


However it crashes now as soon as I run it.  Stack ends like this:


     ProfUIS287nd-RDE.dll!CExtWA<CExtWS<CExtADLG<CExtResDlg>,301> >::NcFrameImpl_GetMinMaxInfo(tagMINMAXINFO * pMMI=0x00000000)  Line 1775 + 0x12 bytes    C++

>    ProfUIS287nd-RDE.dll!CExtNCW<CExtResizableDialog>::NcFrameImpl_GetMinMaxInfo(tagMINMAXINFO * pMMI=0x00000000)  Line 639    C++


The line in question looks like this:


            pMMI->ptMinTrackSize = m_ptMinTrackSize;


pMMI is NULL, hence the crash.  The stack seems to be missing some calls after the two above.


Thoughts?


Rob.