| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | HELPPPP!!! |
20 Aug 94, Carl Forester writes to Jon Guthrie: >> 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? > Thanx for the answer to my question, but! > This program will never be run on a LAN, so I don't see the problem with > it writing to itself. Not all applications are made to or are run on a > LAN. For that matter, there lots of programs with cfg files that won't > run properly on LAN's. The world doesn't revolve around LAN's. You misunderstand. I am NOT saying that the reason that you cannot use that stupid kluge of saving configuration information to the executable under OS/2 is because of difficulty with LAN's. I am saying that that is one of the most obvious reasons why you SHOULD NOT use that stupid kluge under DOS or anywhere else. None of my stuff runs on LANs, either, but I like being able to have different configurations depending on which directory I run the program from. (I also like not having to tell people that they can't run my program because they're going to run it from a LAN.) OS/2 prevents you from writing to the executable for two reasons: First, it allows the system to discard the pages of the executable when it runs out of space instead of moving them into the swapfile. This allows for a considerable shrinking of the space needed for the swapfile. Secondly, denying write access to the executable means that it can keep a single copy of the executable in memory instead of requiring one copy for eash process that wants to run that executable. That reduces overall resource load on the system. That is why you CAN NOT do that under OS/2. - 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™.