#include "registry_config.h"
+#include <application/windoze_helper.h>
#include <basis/astring.h>
#include <basis/functions.h>
#include <basis/utf_conversion.h>
using namespace filesystem;
using namespace structures;
-#ifdef _MSC_VER
+#ifdef __WIN32__
// this implementation only works on windows currently.
//hmmm: i suppose we could fake it with an ini file.
// the longest that value names can be in the registry.
// a default we hope never to see in the registry.
-//SAFE_STATIC_CONST(astring, registry_configurator::reg_str_fake_default,
- // ("bogus_never_should_see"));
const astring ®istry_configurator::reg_str_fake_default()
{
static astring _hidden = "bogus_never_should_see";
if (!to_store.length()) return delete_entry(section, entry);
else if (!section.length()) return false;
-#ifdef _MSC_VER
+#ifdef __WIN32__
HKEY key;
long ret = RegOpenKeyEx((HKEY)translate_hive(_hive),
to_unicode_temp(section), 0, KEY_WRITE, &key);
if (!section_in) return false;
if (!entry) {} // not a problem.
astring section = fix_section(section_in);
-#ifdef _MSC_VER
+#ifdef __WIN32__
HKEY key;
long ret = RegOpenKeyEx((HKEY)translate_hive(_hive),
to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key);
info.reset();
if (!section_in.length()) return false;
astring section = fix_section(section_in);
-#ifdef _MSC_VER
+#ifdef __WIN32__
HKEY key;
long ret = RegOpenKeyEx((HKEY)translate_hive(_hive),
to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key);
FUNCDEF("section_exists");
if (!section_in.length()) return false;
astring section = fix_section(section_in);
-#ifdef _MSC_VER
+#ifdef __WIN32__
HKEY key;
long ret = RegOpenKeyEx((HKEY)translate_hive(_hive),
to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key);
if (!section_in.length()) return false;
astring section = fix_section(section_in);
//if the key doesn't exist, should that be a failure?
-#ifdef _MSC_VER
+#ifdef __WIN32__
long ret = SHDeleteKey((HKEY)translate_hive(_hive),
to_unicode_temp(section));
if (ret != ERROR_SUCCESS) {
astring section = fix_section(section_in);
if (!entry) {} // no problem.
-#ifdef _MSC_VER
+#ifdef __WIN32__
HKEY key;
long ret = RegOpenKeyEx((HKEY)translate_hive(_hive),
to_unicode_temp(section), 0, KEY_SET_VALUE, &key);