TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Michael Douglass
from: david nugent
date: 1994-06-26 06:18:12
subject: ..ini Bludgeoning

> week ago...  It did pretty well...  I think the general attitude was
 > that the OS2.INI file should only be used to store the path to the
 > private INI file.  However, this is not needed either, since the path to
 > the program can be obtained from the argv/argc variables to reference an
 > INI in the base directory of your program.

Not if you want your code to be portable to other OS/2 compilers, it wouldn't.

Argv in all except BCOS2 returns whatever was typed on the command line,
not the fully resolved path.  There are, however, two was to get it - the
first by scanning to the end of the environment block, the second (easier)
method using DosGetInfoBlocks() (or DosGetInfoSeg()) and
DosQueryModuleName().

david

---

* Origin: Unique Computing Pty Ltd (3:632/348)
SEEN-BY: 54/54 620/243 632/301 348 365 633/379 635/503 640/820 690/660
SEEN-BY: 711/409 413 430 807 808 809 934 712/353 623 713/888 800/1 2442/0
@PATH: 632/348 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™.