Path: utzoo!attcan!uunet!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!news.funet.fi!funic!santra!tuura!risto From: risto@tuura.UUCP (Risto Lankinen) Newsgroups: comp.windows.ms Subject: EnumProfileStrings() , is there such? Message-ID: <765@tuura.UUCP> Date: 20 Sep 90 12:48:13 GMT Distribution: comp Organization: Nokia Data Systems Oy Lines: 27 Hi! There are functions Get/WriteProfileString() in Windows SDK 2.0 and, in addition, Get/WritePrivateProfileString() in Windows SDK 3.0 . They work fine, but to use them, you would need to know either/both of the section name (which appears in square brackets in corresponding .INI file) and/or the keyword (which is followed by equal sign and the setting itself). Now, is there a way to 'Enumerate' either the section names in a particular .INI file or the keywords under a particular section? Haven't found one, except just reading the file and inspecting it on a line-by-line basis (which I regard extremely inelegant). I'm also wondering what I *think* I have seen (but could not verify in an actual installation). That is, the same keyword more than once under one section tag (as far as I recall right, the 'windows' section in WIN.INI has been noticed to list more than one 'device' keywords). Well, calling the GetProfileString("AnySection","NonUniqueKeyword",...) returns only the setting of the first occurrance of more than one. Wondering how the others could be read... Terveisin: Risto Lankinen -- Risto Lankinen / product specialist *************************************** Nokia Data Systems, Technology Dept * 2 2 * THIS SPACE INTENTIONALLY LEFT BLANK * 2 -1 is PRIME! Now working on 2 +1 * replies: risto@yj.data.nokia.fi ***************************************