![]() |
CXTRegistryManager issues. |
Post Reply
|
| Author | |
Dario
Newbie
Joined: 27 February 2008 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTRegistryManager issues.Posted: 27 February 2008 at 5:44am |
|
Hi.
I'm using CXTRegistryManager for quick and clean data accessing, but recently our program design changed and now it assumes that program is run under limited user account, thus we need to seize all writing and reading from system registry. So I decided to use INI file instead of registry. This would allow quick and clean port from registry to file data with minimal code changes. But there are several issues when working with INI files. 1. When using CXTRegistryManager::GetProfileBinary and WriteProfileBinary. When using INI files there is a limit on size of character array on writing and reading from file. (4095). However this is not an issue when working with registry. Considering we are using serialization to write CTreeCtrl data in the file 4096 bytes is enough to store only about 16 tree nodes. We changed that value, and are wondering what impact could it have on program stability? 2. There is an issue with EnumValues and EnumKeys. These functions work only with registry and not with INI files. Is there a way to EnumValues from a INI file? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 February 2008 at 1:38pm |
|
1. Its system limit. if you need write such big data, think better create some binary Archive. and use CFile +CArchive to serialize it.
Also maybe CXTPPropExchangeXMLNode can work for you.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 February 2008 at 1:05pm |
|
Generally, modern software store data in the local app folder (I recall Microsoft recommends this). That is:
SHGetSpecialFolderPath(hwnd, szPath, CSIDL_LOCAL_APPDATA, FALSE);
PathAppend(szPath, _T("MyProgramName"));
// Place configuration files in the 'szPath' directory.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |