Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows 64 Bit > Re: Trouble with .ini files on Win7 x64

Reply
Thread Tools Display Modes

Re: Trouble with .ini files on Win7 x64

 
 
Charlie Russel - MVP
Guest
Posts: n/a

 
      04-20-2010

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

>
>


 
Reply With Quote
 
 
 
 
John Barnes
Guest
Posts: n/a

 
      04-24-2010
You need to determine where the app is reading the ini. file from. There is
no magic. Charlie pointed out the obvious difference in 64-bit systems.

"David Kerber" <ns_dkerber@ns_warrenrogersassociates.com> wrote in message
news: ions.net...
> In article <>,
> says...
>>
>> 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.

>
> I'm not reading anything in system32; it's in \windows and appdata\local
> \virtualstore, and I've tried editing both copies.
>
> D
>

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive D XpPro 64 not needed with Win7 64bit RoseW Windows 64 Bit 9 11-06-2009 07:05 PM
Files Remain Hidden Even though I selected show Hidden & Protected LabTechnician Windows Vista File Management 11 03-02-2008 09:08 AM
Viewing Hidden files and folders PAS Windows Vista File Management 35 02-17-2008 12:03 AM
Error reports what do they mean Joe83 Windows Vista Hardware 1 06-07-2007 03:35 AM
Offline Files Mike Benton Windows Vista File Management 1 05-04-2007 07:58 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59