home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / msdos / programm / 8178 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.1 KB  |  44 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!torn!news.ccs.queensu.ca!dmurdoch
  3. From: dmurdoch@QueensU.CA (Duncan Murdoch)
  4. Subject: Re: changes to exe (binary) file
  5. Message-ID: <Bs7nEp.JLt@knot.ccs.queensu.ca>
  6. Sender: news@knot.ccs.queensu.ca (Netnews control)
  7. Organization: Queen's University, Kingston, Canada
  8. References: <1992Jul29.125540.7401@hou.amoco.com> <1992Jul30.152020.8261@menudo.uh.edu>
  9. Date: Thu, 30 Jul 1992 16:35:13 GMT
  10. Lines: 32
  11.  
  12. In article <1992Jul30.152020.8261@menudo.uh.edu> cosc16to@menudo.uh.edu (Andy Hakim) writes:
  13. >In article <1992Jul29.125540.7401@hou.amoco.com> jim@n5ial.chi.il.us writes:
  14. >>
  15. >>I've seen lots of programs (usually shareware types) that allow you to
  16. >>make configuration changes, insert registration info, etc., directly into
  17. >>the compiled exe file.  
  18.  
  19. >To figure out the offset:  (DEFAULT_OFFSET in example)  compile the
  20. >program, then use a program such as LIST to scan for a sequence of
  21. >matching bytes ( 100 118 138 )  The HEX DUMP mode of LIST is handy.
  22. >Next, go back to your source file, and update the correct offset.
  23. >An alternative way to figure out the offset is to use info from .map files.
  24.  
  25. Those are both quite dangerous.  Plenty of people use PKLITE or LZEXE or
  26. another .EXE compressor to modify .EXE files; if you blindly go reading
  27. and writing at a specific location, you'll mess up badly.  A better
  28. solution is to append the data to the .EXE file; the unbuggy compressors will
  29. think it's an overlay, and leave it alone, or refuse to work.  You
  30. should also be sure to put a signature in the record, so you can double
  31. check that whatever calculation you end up with is correct.
  32.  
  33. If you want to be really nice to your users, you'll give them the option
  34. of reading the config info from a config file, too.  That way it's easy
  35. to maintain multiple different configurations.
  36.  
  37. A nice way to do this (both ways) is using a Turbo Vision resource file,
  38. if you're using Borland's Pascal or C++.  It's very easy to use a config
  39. file if present or your .EXE if not, and all the signature checking is
  40. built in.
  41.  
  42. Duncan Murdoch
  43. dmurdoch@mast.queensu.ca
  44.