TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Carl Forester
from: Daniel Doran
date: 1994-08-22 21:03:00
subject: Writing To .Exe`s

CARL FORESTER had something deep to write about Writing to .EXE's

CF> I've written a program that writes the configuration info to
CF> itself.  Is there any way I can get this program to
CF> write to itself, or do I have to go back to a .CFG file, or
CF> seperate config program?

I'm almost certain that you will have to do something other that
overwrite part of the program.  OS/2 locks access to a program when it
runs it.  It does this to insure that the code will not change during
operation.  When committed memory exceeds physical memory, OS/2 can
move data to the swapper.dat file (if swapping is enabled) or discard
code that is not in immediate use.  Whenever that code is needed again,
it can be read back from the program file.  You can only modify OS/2
program files when they aren't being run.

There are several possibilities for configuration storage:

 1) a .CFG or .INI file specific to that program
 2) Extended Attributes attached to the program
 3) a few bytes of data in the OS2.ini file
 4) a separate configuration program that modifies the program code.

 * KWQ/2 1.2f * All I want for Christmas is a box of Smurfs and a mallet.


--- QScan v1.11b / 01-0093

* Origin: (1:381/123)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 712/353 623 713/888 800/1
@PATH: 381/123 900 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.