Print Page | Close Window

CXTRegistryManager issues.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9714
Printed Date: 14 November 2025 at 2:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTRegistryManager issues.
Posted By: Dario
Subject: CXTRegistryManager issues.
Date 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?
     



Replies:
Posted By: Oleg
Date 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


Posted By: znakeeye
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net