Reputation: 551
Simple question, if someone happens to know the answer. I'm maintaining an old Windows app; it uses GetProfileInt to retrieve a setting. Documentation says it reads "from the registry". Whereabouts? I know on older OSs, it read from win.ini. Where do the win.ini-type entries get stored in the registry?
Thanks, Laure
Upvotes: 2
Views: 2710
Reputation: 1777
MSDN says it is whether in INI files, whether in the Registry depending on the Windows version you're running. I followed their instructions but couldn't find what I was looking for (like lots of users on the Internet).
So this is what I did with bruteforce:
1/ Open C:
drive, make a search on all *.ini
files containing the keyword you're getting with GetProfileInt
. If nothing shows up, it's in the registry.
2/ Open regedit
, make a search on the keyword.
In my case I was running Windows XP and point 1/ worked, the file I was looking for was in C:\Windows\
and named {MYAPP}.ini
Upvotes: 1
Reputation: 7377
Your answer is defined somewhat technically in the MSDN docs for that function.
http://msdn.microsoft.com/en-us/library/ms724360
Essentially, that call is for 16-bit Windows compatibility, but it can still work if you set up some mapping in the Registry first.
In short, you probably want to use instead use real Registry functions if at all possible.
Upvotes: 1
Reputation: 148
The MSDN documentation for GetProfileInt gives the path. If that turns out to be wrong, ProcMon from www.sysinternals.com ought to show you.
Upvotes: 0