home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / ICLUIDLL / READ.ME < prev    next >
Text File  |  1993-10-11  |  6KB  |  152 lines

  1. Rebuilding DDE4MUI.DLL
  2. ======================
  3.  
  4. Why You May Want to Rebuild
  5. ---------------------------
  6.  
  7. If you are shipping a renamed version of DDE4MUI.DLL with your
  8. application, you can reduce the size of this DLL by rebuilding 
  9. DDE4MUI.DLL and leaving out the classes that your application 
  10. does not use.
  11.  
  12. A smaller DLL takes up less space on your installation media and
  13. can also result in faster load time for the applications that use
  14. the DLL.
  15.  
  16.  
  17. How to Rebuild
  18. --------------
  19.  
  20. Use the following procedure to rebuild:
  21.  
  22. 1. Make \IBMCPP\ICLUIDLL your current directory.
  23.    (This is the directory where this text file resides.)
  24.  
  25.    If CSet++ is installed in \IBMCPP, enter:
  26.  
  27.      CD \IBMCPP\ICLUIDLL
  28.  
  29.    NOTE: These instructions assume CSet++ is installed in
  30.          \IBMCPP.
  31.  
  32. 2. Extract the needed .OBJ files from the User Interface Class Library 
  33.    static libraries.
  34.  
  35.    To get the best performance for your rebuilt DLL, you must link the 
  36.    object files in the order specified in REBUILD.RSP.  To do this, 
  37.    extract the .OBJ files from the User Interface Class Library static 
  38.    libraries instead of re-linking the DLL by using the static libraries 
  39.    directly.
  40.  
  41.    To extract the needed .OBJ files and put them in the \IBMCPP\ICLUIDLL 
  42.    directory enter:
  43.  
  44.       GETOBJS ..\LIB\DDE4MUIB.LIB
  45.       GETOBJS ..\LIB\DDE4MUIC.LIB
  46.       GETOBJS ..\LIB\DDE4MUID.LIB
  47.  
  48.    NOTE: If your application does not use the Dynamic Data Exchange (IDDExxx)
  49.          classes or the Direct Manipulation (IDMxxx) classes, you do not
  50.          need to run GETOBJS against DDE4MUID.LIB.
  51.  
  52. 3. Modify DDE4MUI.DEF and REBUILD.RSP
  53.  
  54.    To remove a class from your rebuilt DLL, you must first determine the
  55.    name of the .OBJ file in which the class implementation resides.  
  56.    However, be aware that some .OBJ files contain more than one class 
  57.    implementation.  If your application uses ANY of the classes that an
  58.    .OBJ file implements, you cannot remove it.
  59.  
  60.    The cross-reference tables in Appendix A of the "User Interface
  61.    Class Library Reference" can help you determine the .OBJ file that
  62.    implements a given class.  Although this table lists the .HPP file,
  63.    you can generally substitute .OBJ for .HPP to determine
  64.    the right name for the .OBJ file.  
  65.  
  66.    For some classes, such as IString and IResourceLibrary, a single .HPP 
  67.    file declares the class, but multiple .OBJ files contain the 
  68.    implementation.  In these cases, a number is appended to the file name 
  69.    to make the .OBJ file names unique.  For example, the implementations 
  70.    of the classes declared in IRESLIB.HPP are in IRESLIB.OBJ, IRESLIB1.OBJ, 
  71.    IRESLIB2.OBJ, IRESLIB3.OBJ, and IRESLIB4.OBJ.  For sequentially numbered 
  72.    .OBJ files such as these, either remove ALL of the .OBJ files or do not 
  73.    remove any.
  74.  
  75.    Once you determine the .OBJ files that you do not need for your
  76.    rebuilt DLL, do the following:
  77.  
  78.      * Edit REBUILD.RSP and remove the lines that list the unneeded
  79.        .OBJ files.
  80.  
  81.      * Edit DDE4MUI.DEF and remove all lines that export the functions
  82.        contained in the .OBJ files whose lines you removed from REBUILD.RSP.
  83.  
  84.    REBUILD.RSP and DDE4MUI.DEF are both found in the \IBMCPP\ICLUIDLL 
  85.    directory.
  86.  
  87.    For example, if you do not want to use the ITime class, delete the 
  88.    two lines that export Ordinals 358 and 359.  These lines are below 
  89.    the comment lines that identify the exports from ITIME.OBJ:
  90.  
  91.      ;
  92.      ; --> Object: C:\DRVRGM3\IBASE\OBJ\ITIME.obj
  93.      ;
  94.      __ls__FR7ostreamRC5ITime  @358 noname         ----> DELETE
  95.      asString__5ITimeCFPCc  @359 noname            ----> DELETE
  96.      ;
  97.  
  98.    The table below can help you identify groups of files that you can 
  99.    delete.  This table provides the wildcard .OBJ file name and the 
  100.    conditions under which you can delete all files that match the pattern:
  101.  
  102.      File Name Pattern     Can Be Deleted if Your Application
  103.      -----------------     ----------------------------------
  104.       N*.OBJ               Never uses I_NO_INLINES when compiling
  105.       ICNR*.OBJ            Does not use Container controls
  106.       IDDE*.OBJ            Does not use Dynamic Data Exchange
  107.       IDM*.OBJ             Does not use Direct Manipulation
  108.  
  109. 4. Build the new DLL
  110.  
  111.    Once you modify DDE4MUI.DEF and REBUILD.RSP to remove what you do
  112.    not want to include in your DLL, you are ready to link your 
  113.    .OBJ files.  To do this, enter the following commands:
  114.  
  115.       ICC @REBUILD.RSP
  116.       IMPLIB DDE4MUII.LIB DDE4MUI.DEF
  117.  
  118.    These commands create the DLL (DDE4MUI.DLL) and its corresponding
  119.    import library (DDE4MUII.LIB) in the current directory, which is 
  120.    \IBMCPP\ICLUIDLL.  You can now use these two files to link your application.
  121.  
  122. 5. Delete unneeded .OBJ files from the \IBMCPP\ICLUIDLL directory
  123.  
  124.    You can delete the .OBJ files in the current directory once you are
  125.    sure you no longer need them for rebuilding.  If you do this, do NOT 
  126.    delete:
  127.  
  128.       DDE4UDLL.OBJ
  129.  
  130.    We ship this file in the \IBMCPP\ICLUIDLL directory because it is not
  131.    available from any of the static libraries.  You need this file
  132.    if you ever attempt to rebuild again.  (It is the DLL Init/Term
  133.    routine.)  You may want to put a backup copy of this file in
  134.    another directory.
  135.  
  136.    A safe way to delete the unneeded files is to enter the following
  137.    commands:
  138.  
  139.      DELETE I*.OBJ
  140.      DELETE N*.OBJ
  141.  
  142.  
  143.  
  144. MSGBIND Limitation
  145. ------------------
  146.  
  147. Due to problems with the MSGBIND utility you can't bind the DDE4UILE.MSG
  148. message file to your rebuilt version of DDE4MUI.DLL.
  149.  
  150. APAR PJ 10718 was opened to address this problem.
  151.  
  152.