Profile .ini or registry profile control 
Author Message
 Profile .ini or registry profile control

Environment: Windows WIN2K & WIN98/NT VC++ 6.0

I have tried very hard to find out how to write to the *.ini file instead of
the registry for the application profile setting WINAPI GetProfileString()
and WriteProfileString().

I have two applications, and they use the same exact GetProfileString() and
WriteProfileString(), but one writes to the *.ini, and the other one writes
to registry. What is the control to switch them ? I created one, and the
other one (write to the *.ini) is from the MSDN sample.

I prefer the *.ini profile storage because it is easier todelete it or
change it.  The online reference really did not tell you how to switch from
the registry to the *.ini profile storing, but it said on NT is will use
registry automatically - that is not what I want.

Thanks

Ted



Sun, 20 Jul 2003 21:36:15 GMT  
 Profile .ini or registry profile control

Quote:
>I have two applications, and they use the same exact GetProfileString() and
>WriteProfileString(), but one writes to the *.ini, and the other one writes
>to registry. What is the control to switch them ?

Ted,

Have a look in your app's InitInstance handler for a call to
CWinApp::SetRegistryKey.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Mon, 21 Jul 2003 00:33:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Profiling a dll with prep, profile from commandline.

2. Profile output window is blank when profiling with IDE

3. : How to display mail profile settings dialog box for the selected profile

4. Writing Profile information to System Registry

5. Profiling an ATL control

6. profiling activex controls

7. "Build/Debug/FF/Profiles"-like tab control or MFC extension

8. How to Profile all threads with one profile session ?

9. profiling

10. error spawning cl.exe when profile

11. Profiling VC7/VC71 generated code

12. Profiling

 

 
Powered by phpBB® Forum Software