Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTRegistryManager issues.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTRegistryManager issues.

 Post Reply Post Reply
Author
Message
Dario View Drop Down
Newbie
Newbie
Avatar

Joined: 27 February 2008
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dario Quote  Post ReplyReply Direct Link To This Post 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?
     
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.