[comp.windows.ms] WIN.INI PROFILE STRINGS?

mcdonald@aries.uiuc.edu (Doug McDonald) (10/06/89)

I am writing a Windows program that needs to know where to find
several files that it uses. These will be set up once when the program is
loaded and will seldom be changed. Is is polite to put them into the
win.ini file? There don't seem to be any such things there in mine.

Doug McDonald (mcdonald@aries.scs.uiuc.edu)

paul@cscnj.csc.COM (Paul Moody) (10/06/89)

In article <1989Oct5.184151.6942@ux1.cso.uiuc.edu>, mcdonald@aries.uiuc.edu (Doug McDonald) writes:
> I am writing a Windows program that needs to know where to find
> several files that it uses. These will be set up once when the program is
> loaded and will seldom be changed. Is is polite to put them into the
> win.ini file? There don't seem to be any such things there in mine.
> 
> Doug McDonald (mcdonald@aries.scs.uiuc.edu)

Yes it is polite. 
Set up your own section of win.ini and add your filenames as strings.
WriteProfileString will do this. Do not attempt to read/write this
file yourself.

-- 
Paul Moody			UUCP: rutgers!cscnj!paul 
Computer Sciences Corporation
# the opinions expressed are entirely imaginary			#

don.roy@canremote.uucp (DON ROY) (10/11/89)

Doug - many WinApps place needed info such as you suggest into the 
WIN.INI. What is not considered polite, by many experienced MSW users, 
is that these apps DON'T ASK BEFORE THEY DO IT! No more than you might 
want some DOSapp modifying your AUTOEXEC.BAT or CONFIG.SYS files without
your knowing it, Windows users don't want unknown mod's being made to 
the WIN.INI.

Suggestion: It's probably the best place to put the info your program 
needs to keep handy, but let the user know what's happening and put a 
section header in the WIN.INI, such as [YourApp], so that it's easily 
identifiable ... and traceable to your prg.

If you must modify any other section of the WIN.INI, you'd best find 
another way. Rgds...DON

Canada Remote Systems (CANREMOTE.UUCP)
---
 * Via ProDoor 3.1R