home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / bin / apfcvt.txt < prev    next >
Encoding:
Text File  |  1995-07-11  |  5.0 KB  |  163 lines

  1.  
  2.  
  3.  
  4.               Apfcvt User Documentation
  5.  
  6.                 June 28, 1994
  7.  
  8.  
  9.  
  10.     Apfcvt is used to convert executables or libraries so that
  11. they load profiling libraries rather than their conventional
  12. libraries.  Apfcvt works for both 16-bit and 32-bit programs.
  13.  
  14.  
  15.  
  16. 1    GUI Interface
  17.  
  18.     The GUI interface provides for easy converting of binaries or
  19. for setting up a "project" of conversions for automation.  Each
  20. control of interface is explained below.
  21.  
  22.  
  23. 1.1    Binary List
  24.  
  25.     The Binary List shows the executables and libraries that will
  26. be converted.  Double-clicking on an entry will display the current
  27. state of its libraries, i.e., converted or not converted.
  28.  
  29.     Binaries may be added or removed using the ADD and REMOVE
  30. buttons.  When adding binaries, an option can selected, RECURSIVE
  31. LOAD, which causes all libraries that the binary uses to be loaded and
  32. then all libraries that they use, etc.  These libraries do not have to
  33. be in the same directory.  Apfcvt will search for them the same way
  34. that Windows searches for libraries loaded with the LoadLibrary()
  35. command.  If a library is already being used by another process, it
  36. will not be loaded.
  37.  
  38.     For convenience when changing from computer to computer, a
  39. Base Directory is associated with the binaries listing.  This base
  40. directory holds the common path for the binaries.  For example, if the
  41. following binaries were added:
  42.  
  43.     c:\apps\excel\excel.exe
  44.     c:\apps\winword\winword.exe
  45.  
  46. the base directory would be "c:\apps" and the binaries listbox would
  47. contain "excel\excel" and "winword\winword".  If one moves to another
  48. computer where the paths of the binaries are:
  49.  
  50.     d:\excel\excel.exe
  51.     d:\winword\winword.exe
  52.  
  53. the user would select the BASE DIRECTORY button and change it from
  54. "c:\apps\" to "d:\"
  55.  
  56.     The Windows directory and the Windows System directory do not
  57. lend themselves nicely to the concept of a base directory.  Therefore,
  58. for any binary located in Windows or System directory, the binary name
  59. is preceded by "%win%", "%sys%", or "%sys32%".  This also simplifies
  60. changing from machine to machine since the Windows and System
  61. directory may change from machine to machine (Ex: "\win", "\winnt",
  62. :"\windows", etc.).
  63.  
  64.  
  65. 1.2    Modification List
  66.  
  67.     There are two listboxes (DON'T MODIFY and MODIFY) that used
  68. for deciding which libraries to convert and which not to.  When a
  69. binary is ADDed, its libraries are placed in one of the two lists
  70. depending on its current state.  If the library is modified, it is
  71. placed in the MODIFY list.  Keep in mind that these lists do not
  72. necessarily reflect the true state of the libraries in each binary
  73. (Double-click on a binary in the BINARY list to check its state).
  74.  
  75.  
  76. 1.3    Convert Character
  77.  
  78.     The CONVERT CHARACTER box holds the character to be used for
  79. the conversion.  While changing this character changes the names in
  80. the MODIFY list, the change does not take effect until the CONVERT
  81. button is pressed (See next section).
  82.     
  83.  
  84. 1.4    Convert/Unconvert
  85.  
  86.     The CONVERT and UNCONVERT buttons are used for modifying the
  87. libraries in the MODIFY list.  CONVERT replaces the first character of
  88. each library with the CONVERT CHARACTER.  UNCONVERT switches the first
  89. character back to its original value.  Keep in mind that UNCONVERT
  90. only affects those libraries in the MODIFY list and not all libraries
  91. that converted.
  92.  
  93.  
  94. 1.5    .CVT files
  95.  
  96.     The current settings can be saved and reloaded later by
  97. choosing the options under the FILE menu.  The settings are saved as
  98. as a .CVT file.  Besides the obvious benefits of saving and reloading
  99. the settings, .CVT files can be used in conjunction with the command
  100. line options for automation purposes.
  101.  
  102.  
  103. 2    Command Line Interface
  104.  
  105.     The command line options are divided into two categories:
  106. support of the options for the old version of Apfcvt and .CVT
  107. processing.
  108.  
  109.  
  110. 2.1    Old Style Command Line
  111.     
  112.     The format for the old Apfcvt is:
  113.  
  114.     apfcvt < new import names > < modules to convert >
  115.  
  116. For example:
  117.  
  118.     apfcvt zernel32 zser32 sol.exe freecell.exe
  119.  
  120. will cause the libraries "kernel32.dll" and "user32.dll" to be changed
  121. to "zernel32" and "zser32.dll" in the binaries "sol.exe" and
  122. "freecell.exe".  To undo this conversion, the following command line
  123. would be used:
  124.  
  125.     apfcvt kernel32 user32 sol.exe freecell.exe
  126.  
  127.     In place of the new import names, the following "macros"
  128. represent several library names:
  129.  
  130.     Use...        To Represent...
  131. ------------------------------------------------------------------
  132.     win32        zernel32
  133.             zdi32
  134.             zser32
  135.             zdvapi32
  136.             zrtdll
  137.  
  138.     undo        kernel32
  139.      OR            gdi32
  140.     restore        user32
  141.             advapi32
  142.             crtdll
  143.  
  144.     By not specifying any import names, Apfcvt will display the
  145. import names of the specified binaries.  For example,
  146.  
  147.     apfcvt sol.exe freecell.exe
  148.  
  149. will display the import names of "sol.exe" and "freecell.exe".
  150.  
  151.  
  152. 2.2    .CVT Processing
  153.  
  154.     The command line format for .CVT processing is:
  155.  
  156.     apfcvt { /c | /u } < file.cvt >
  157.  
  158. The /c option loads the settings from the .CVT file and converts the
  159. libraries in the MODIFY list.  The /u option does the same except it
  160. unconverts the libraries.
  161.  
  162.  
  163.