🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #563

Re: changes to exe (binary) file

#563
From: jim
Date: Thu, 30 Jul 1992 17:34
43 lines
2635 bytes
In article <1992Jul30.152020.8261@menudo.uh.edu> cosc16to@menudo.uh.edu
(Andy Hakim) writes:
> 
>void fsavedefaults(char *program_name)

>The program  can be obtained from most ftp sites as nohiss10.zip.  I'd be
>happy to provide the full source code via email.

thanks!  and thanks again also to the folks who replied by e-mail.

I now have a version working under UNIX (only took a few minutes, even),
but it doesn't seem to work with turbo c++ 1.0.  what a surprise....turbo
c++ fails once again....  oh well, I've got a good start now.

oh, and some heard this via e-mail, but....  once again, ask a question on
the net, and within 24 hours, lots and lots of replies....  and some people
wonder why people think UseNet is worth anything.....  :-)

btw, the way I setup the version that works fine under UNIX is basically
to read the binary into a buffer (fopen'ed, of course, in binary mode),
search for the string you want to replace, determine the offset, and
then replace that with the new version of the string.  what I did, however,
was simply to write the data (all of it) back out to the file, and when I
got to the chars that were to be changed, I inserted the new values instead
of the buffer's values.

only problem with this under turbo c++ 1.0 is that it refuses to open the
file in binary mode...first time it sees a ^Z (around 9k or so), that's
it.  this applies for open and fopen.  does anyone know if there's a patch
for this?  or is there something screwy I'm missing?  (yeah, I know, opening
myself up for major puns there....)

thanks all!
   --jim

\input std_disclaimer                     % 73 DE N5IAL (/9)
------------------------------------------------------------------------------
"[...] the plural of `mongoose' ought to be `polygoose'." [Jargon file 2.9.10]

INTERNET:  jim@n5ial.chi.il.us  |  grahj@gagme.chi.il.us  |  j.graham@ieee.org
UUCP:  gagme!n5ial!jim@clout.chi.il.us
AMATEUR RADIO:  n5ial@n9hsi (Chicago.IL.US.Earth)
------------------------------------------------------------------------------
Technical Details
Message-ID: <1992Jul30.173412.22871@hou.amoco.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!uc.msc.edu!apctrc!wsc!jim
References: <1992Jul29.125540.7401@hou.amoco.com> <1992Jul30.152020.8261@menudo.uh.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!uc.msc.edu!apctrc!wsc!jim
From: jim@n5ial.chi.il.us
Subject: Re: changes to exe (binary) file
Message-ID: <1992Jul30.173412.22871@hou.amoco.com>
Originator: jim@eddie
Sender: news@hou.amoco.com
Reply-To: jim@n5ial.chi.il.us
Organization: me?  have you seen my desk?  : -)
References: <1992Jul29.125540.7401@hou.amoco.com> <1992Jul30.152020.8261@menudo.uh.edu>
Date: Thu, 30 Jul 1992 17:34:12 GMT
Lines: 44