home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / DATPATCH.ZIP / DATPATCH.DOC < prev    next >
Text File  |  1991-01-11  |  2KB  |  45 lines

  1.  
  2.                                 DATPATCH.C
  3.  
  4.          DATPATCH is a quick and dirty utility I wrote to patch the 
  5.          current date-time into an executable module.  
  6.          
  7.          The company I work for uses SNA LU 0 for file transfer.  
  8.          When we send maintenance code, the date-time stamp on the 
  9.          .EXE file is changed during transmission and the file size 
  10.          is rounded up to a 256-byte multiple.  This has caused 
  11.          problems in determining which module was actually in use at 
  12.          the site.  So I devised a quick method of applying the date-
  13.          time to a string imbedded in the .EXE module.  I included a 
  14.          string constant, then wrote a small program to locate that 
  15.          string and replace it with the current system date and time.
  16.  
  17.          In order to use the utility, perform the following steps:
  18.  
  19.             1) Include the following string in your program:
  20.                 
  21.                    char str[] = "COMPILED ON MM/DD/YY - HH:MM";
  22.  
  23.  
  24.  
  25.             2) Add the following command after the compile and link:
  26.  
  27.                    DATPATCH program.exe
  28.  
  29.                where "program.exe" is the .EXE to be modified.
  30.  
  31.  
  32.  
  33.          This implementation is not the most creative or efficient 
  34.          but it works.  It is written in ANSI C, and should be 
  35.          portable to most C environments.  The version included in 
  36.          this package is already compiled using the MAKEIT.BAT and is 
  37.          linked as a family-mode program.
  38.  
  39.          Howard K. Warren
  40.          Scholarship Consulting of Arkansas
  41.          P.O. Box 488
  42.          Little Rock, AR  72203
  43.  
  44.          January 11, 1991
  45.