TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Carl Forester
from: Jon Guthrie
date: 1994-08-15 22:25:44
subject: HELPPPP!!!

11 Aug 94, Carl Forester writes to All:

 > I'm writing a os/2 text mode full screen app.  I'm trying to get the
 > .EXE file to write to itself.  When I try this I get a "Permission
 > denied" error.  The same routine works great in dos.

OS/2 is not DOS.  When OS/2 loads an executable program, it opens it in a
sharing mode that prevents anyone from writing to it.  That means that a
program can't write to its own executable file.

Not only that, but writing programs that save configuration information in
their exe's hasn't been a good idea for a half-dozen years.  How do you
handle a LAN environment where multiple people want to share the same
executable, but want to configure it differently?

My advice is to use an external configuration file.

- Jon

--- GoldED/2 2.42.G0214


* Origin: The Wandering Programmer Comes Home (1:106/2000.25)
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: 30883/25 106/2000 449 116 170/400 280/1 396/1 3615/50
@PATH: 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™.