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 » link ProfUIS as dll to project Collapse All
Subject Author Date
Stephan Wieland Feb 16, 2010 - 1:46 AM

Hello all,


I have a project with static MFC linked, now I don´t want to link ProfUIS also static.


How can I link ProfUIS as DLL and MFC static?


Sorry, but I coudn´t find these settings...


 


Best regards


SW

Stephan Wieland Feb 16, 2010 - 10:50 AM

Thanks for your answer.


I have an application my users can update over internet. i don´t want prof-uis link statically because of size.


So I wanted to deliver the prof-uis dll once with the next update and then go on with only-exe-updates (of my application)


So far I linked mfc statically so I didn´t have to check if the environment is installed on users side.


what would you propose?


 


Best regards


SW

Technical Support Feb 16, 2010 - 11:55 AM

The size of Prof-UIS library can be compared with size of MFC library. In case of Prof-UIS, you can decrease the library size via several ways and make the result DLL 70% smaller (i.e. 30% of maximal size):

1) Remove not needed code parts. There are a lot of lines like //#define __EXT_MFC_NO_*** near beginning of the ..\Prof-UIS\Include\Prof-UIS.h file. You can uncomment them to remove appropriate Prof-UIS components.

2) Remove the not-needed resources. Please take a look at the ..\Prof-UIS\Include\Resources\resource.rc file. First of all, you can uncomment lines like //#define __EXT_MFC_NO_RESOURCES_*** to remove not needed localizations. Prof-UIS supports 40 languages. In the most cases customer apps does not need all the translations. Second, The resources of Office 2007 and Office 2010 UI themes contain a lot of uncompressed BMP images. If you are not using these UI themes, then you can comment the #include "Res2007\\Res2007.rc" and/or #include "Res2010office\\Res2010office.rc" lines. Third, the geo controls have their own bitmap resources including large resolution image of earth map. If you are not using the geo controls, then you can comment the #include "ResGeoControls\\ResGeoControls.rc" line of code.

But you can use a simpler approach. The Prof-UIS library can be compressed using ZIP/RAR/7z algorithms to much smaller size. Your Internet updating software can be tuned for transferring compressed files. The 7z files created with highest compression setting look like the smallest. The MFC DLLs also can be compressed very well.

If your software is updated via Internet, then you have reason to split it into much possible count of DLLs to make sizes of updates smaller. Even MFC library has service packs and you may have reasons to switch to latest MFC.

Technical Support Feb 16, 2010 - 10:10 AM

This configuration you would like to have is not supported. If the MFC was internal part of your compiled EXE module, all MFC’s functions and methods would become not exported and external DLLs have no chances to access MFC code. Would you explain why you want to hide MFC statically and leave Prof-UIS as DLL?