- fixed SF# 2012050: Configuration key created on read access; - Poco::Util::WinRegistryKey now has a read-only mode; - Poco::Util::WinRegistryKey::deleteKey() can now recursively delete registry keys

This commit is contained in:
Guenter Obiltschnig
2008-09-18 09:04:17 +00:00
parent 707381faca
commit 14a4c61355
6 changed files with 137 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
//
// WinRegistryConfiguration.cpp
//
// $Id: //poco/svn/Util/src/WinRegistryConfiguration.cpp#1 $
// $Id: //poco/1.3/Util/src/WinRegistryConfiguration.cpp#3 $
//
// Library: Util
// Package: Windows
@@ -62,7 +62,7 @@ bool WinRegistryConfiguration::getRaw(const std::string& key, std::string& value
{
std::string keyName;
std::string fullPath = _rootPath + ConvertToRegFormat(key, keyName);
WinRegistryKey aKey(fullPath);
WinRegistryKey aKey(fullPath, true);
bool exists = aKey.exists(keyName);
if (exists)
{
@@ -112,7 +112,7 @@ void WinRegistryConfiguration::enumerate(const std::string& key, Keys& range) co
{
std::string keyName;
std::string fullPath = _rootPath+ConvertToRegFormat(key, keyName);
WinRegistryKey aKey(fullPath);
WinRegistryKey aKey(fullPath, true);
aKey.values(range);
aKey.subKeys(range);
}