| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re:Writing to .EXE`s |
Hello Carl! Reply to Message from Carl Forester to All: CF> I've written a program that writes the configuration info to itself. CF> It works just fine in dos. But the in the os/2 version I get an CF> message that say ACCESS DENIED. Is there any way I can get this CF> program to write to itself, or do I have to go back to a .CFG file, CF> or seperate config program? 1. You can't write to an .exe under OS/2, because the System opens the file in a sharing Mode, When you start a second task with the program, the System doesn't load the code twice. 2. OS/2 uses Virtual Memory and can swap pages (4096byte in size) out of memory or back. But the Code of a program is only discarded and if the System uses the code again, it reloads it from the .EXE. Code isn't swapped out to the SWAPPER.DAT 3. The Code-Segment of a program ist ReadOnly and so you can get problems with statement 2. 4. What about using the program in a Network, when every user wants to save the configuration ? 5. It's not a good programming practice. 6. You should use the PRFxxxx Functions to write to an .INI File. Best way to do is to create you own and not to write to OS2.INI or OS2SYS.ini, because of better copyying the configuration-data to a different machine. Greetings/2 Oliver! --- FleetStreet 0.90wb* Origin: Far from the Westerwald. (2:2461/214.6) 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: 2461/214 201 9 24/24 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 @PATH: 711/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™.