Master Resource File For String DLLs  Previous topicNext topicFirst topicLast topic



Master Resource File For Satellite DLLs

Master Concept
The Enterprise version of ResMe adds the ability to create a "Master Resource File" that spans multiple projects. Suppose you have a large application that consists of many different VB projects but you want consolidate all the resource strings in one central repository, such as a string DLL that serves up strings to all the various EXE files that constitute your entire system. ResMe allows multiple projects to be processed and receive their own resource file, but ResMe also accumulates all resource strings from all projects in a central master.res resource file.

How It Works
Master mode is invoked by specifying a master root directory located on the Processing Options dialog. The Processing Options dialog should be shown by selecting it under the Options menu on the main screen of ResMe. On this form you will see a frame for "Directory For Master SuperSet Resource Files". Simply fill in the directory where you want your master resource file to reside. The sub-directory must be created by you ini advance. One example directory might be C:\\Common\\Shared. It is important that only one resource file and only one RC file be present in this directory.

Normally the master resource directory will be empty because ResMe will initialize and manage these files. The first time you run a VB project through ResMe, two identical copies of resource files and RC files will be created. One copy will be the normal resource file and RC file for the VB project that is located in the \\New1 directory for that project, which is business as usual. A second copy of these files will be copied into the master directory and it will contain all the resource strings of this first project.

Now suppose Project2 is processed by ResMe with the master mode enabled. Project2 will be processed as usual and ResMe will generate the appropriate resource and RC files for this project, but things will be slightly different this time. The master resource file will be searched for string reuse whenever a reoccurring string is encountered. This will result in an occasional shift in resource IDs for Project2's resource strings, but the project's resource file will contain all the strings necessary for the project. The master resource file will accumulate any new resource strings that were found in Project2. The master resource file will be the union of the resource strings in Project1 and Project2.

This process will be repeated for each additional project that is processed by ResMe. The master resource file will be getting bigger and bigger, like a snowball that grows larger each time it is rolled through the snow. But the master resource file will contain only one copy of each string, unless a string was specified as being no-share, in which case it will receive its own duplicate entry. Now you will have two options... you can run each project with its corresponding resource file or you can run any project with the master resource file.

Benefits Of The Master Resource File
The master resource file or master RC file can be used to create a string DLL that serves multiple EXEs from different projects. It also results in a smaller central resource file because identical strings like &File, &Edit, &Help, etc. are shared by having only one entry for all occurrences in all projects. This also reduces translation costs and improves consistency throughout your system.