Chances are that your application is not reading the same file as you're
editing. Keep in mind that there are two versions of "system32" -- the one
that 64bit applications see, in \windows\system32, and the one that 32-bit
applications see, in \windows\SysWOW64.
--
Charlie.
http://msmvps.com/blogs/russel
"David Kerber" <ns_dkerber@ns_warrenrogersassociates.com> wrote in message
news: ions.net...
> Oops, forgot to specify: the trouble I'm having is that I'm always
> getting back my "default" value; it's not reading from the .ini file.
>
>
> In article < .net>,
> ns_dkerber@ns_warrenrogersassociates.com says...
>>
>> I'm having trouble reading values from a .ini file on windows 7 x64.
>> Specifically, changes that I make in a text editor are not appearing
>> when I try to read them in through my application. Other settings that
>> have been in the .ini file for ages will read in just fine; just not the
>> new entries.
>>
>> I have made the changes in both copies of my .ini file: the one in c:
>> \windows, and the one in my appdata\local\virtualstore\windows folder,
>> and while changes in either one of these appear in the other in the text
>> editor, they will not show up when I read them in from my app, even
>> though long-standing entries work fine.
>>
>> I'm sure it's something to do with win7's virtualization, but can't
>> figure out how to get around it; can somebody tell me what I'm missing?
>>
>>
>>
>> My code I'm usiing is:
>>
>> labelName = GetIniString("WebSIRA", "OspFullLabel", "", "WinTM.ini")
>>
>>
>> and GetIniString is:
>>
>>
>> Function GetIniString$(AppName$, KeyName$, Default$, IniFileName$)
>> 'calls windows API call to get the desired string from the specified
>> .ini file
>> ReturnString$ = Space(255)
>> BuffSize& = Len(ReturnString$)
>> StringLen& = GetPrivateProfileString&(AppName$, KeyName$, Default$,
>> ReturnString$, BuffSize&, IniFileName$)
>> GetIniString$ = Left$(ReturnString$, StringLen&)
>>
>> End Function
>>
>>
>>
>> Thanks!
>> D
>
>